Introduction
This article is about Windows Services in the .Net Framework. We learn how to
make and use a Windows Service in our C#.Net Framework applications.
Procedure to create a Windows Service
1. Open a new windows project in Visual Studio.

2. Right-click on the Windows Service screen and select "Add installer".
Two installers are added and displayed in the Windows Service design view.
Installers.JPG
3. Go to the service installer property and set the following properties:
- Description
- Display Name
- Service Name
- Start Type

4. Go to the service process installer property and set the account property to
"Local System".

5. Now drag a tool of evenLog1 from the tool box into the service designer and
write the following code:
public Service1()
{
InitializeComponent();
if
(!System.Diagnostics.EventLog.SourceExists("MySource"))
System.Diagnostics.EventLog.CreateEventSource("MySource",
"MyNewLog");
this.eventLog1.Source
= "MySource";
this.eventLog1.Log
= "MyNewLog";
}
On Start function
protected
override void
OnStart(string[] args)
{
this.eventLog1.WriteEntry("Windows service start at: " +











Iqrar AliPosted Dec 9, 2016, 10:52 AM
Dear bro have u ever worked on SSL/TLS that upload and download files.
K P Singh ChundawatPosted Dec 28, 2014, 3:06 AM
Nice Article ...
gargprabhatPosted Apr 13, 2014, 1:39 PM
hi need your help i would like to capture user event of login and logout time in window please help me how to doit
pandi duraiPosted Dec 21, 2013, 6:11 AM
it is ok
nithyaPosted Jul 21, 2012, 2:03 AM
In the 6th step wen i choose setup and deployment i dont find any items right pannel ... then how can i choose setup project
aakash kumarPosted Apr 9, 2011, 9:40 AM
help to make windows services for shutdown,restart,logoff the particular client machine from the server machine on the network
yang xyPosted Dec 17, 2010, 2:04 AM
Thanks,before step 9 should execute "add project group"?
tinaPosted Oct 26, 2010, 5:41 PM
i've done all these steps..thanks. no wi need to make some db calls, retrive some data do some RPC calls and process the info and then right back in the db. What is the best aproach to do db calls and RPC calls in a windows service. Thanks for the help.
Muhammad IrfanPosted Jul 8, 2010, 7:13 AM
well, its simple an article that guides you how to make a windows service. You can add many more things on start and stop functions, its all up to you, how you make the service more useful for you and also others who use it. you can do with your service what you want to do
mohit mahajanPosted Jul 8, 2010, 5:02 AM
tht gudd but will u plz tell me whts the use ot this servicee??