Skip to main content

Posts

Showing posts with the label Windows Service

Creating a Windows Service in C#

NOTE: The project name in this sample code is mcWebService which is a spelling mistake. I meant to put mcWinService . And now I don't want to change all the screen shots and code all over again. I hope it won't confuse you :). Ok, its time for one more tutorial. This times pick is Windows Services. Creating Windows Services is not a big deal using C# and Visual Studio . Just follow few simple steps and you are all set to run and test your first Windows Service. Windows Services is new name for NT Services you used to develop in previous versions of Visual Studio. This tutorial walks you through how to create and use your Windows Services. This Service writes some text to a text file when stop and start the service. The base idea is taken from MSDN but its more elaborated. You can modify it according to your needs. Step 1. Create Skeleton of the Service To create a new Window Service, pick Windows Service option from your Visual C# Projects, give your service a name, and click ...