Working with Windows Services in .NET
page 2 of 8
by Joydip Kanjilal
Average Rating: 
Views (Total / Last 10 Days): 42330/ 67

What are Windows Services?

Windows services are long running executable applications that typically do not possess any user interface, are controlled by the Service Control Manager (SCM) and can even be configured to start automatically after the system boots.  They typically execute in their own windows sessions. They can execute even if the user has not logged in to the system.  They can even be started, paused, re-started manually.  These applications are somewhat similar to the daemon processes of UNIX in the sense that they remain dormant most of the time and execute in the background as and when needed.

View Entire Article

User Comments

Title: Mr   
Name: Gautam Sharma
Date: 2007-01-02 5:48:04 AM
This article is very nice.I run my first windows service and installed sucessfully.
Title: Good article   
Name: Harinath
Date: 2006-12-20 12:50:50 AM
I found this article really useful. thanks for the same
Title: .NETPhreak   
Name: Dhaval Patel
Date: 2006-12-07 1:51:32 AM
It should be pointed out that the call to the OnStart() method should return back to the SCM (Service Control Manager) within 30 seconds (this value can be altered in the registry, but it is not always feasible to do so in a production environment). The best idea is to encapsulate all your functionality into a separate .dll within a method, say for example RequestStart(), that is spawned in a new thread. All that you would need then is to instantiate that .dll in OnStart() and call RequestStart() - since RequestStart() has all its functionality in a new thread, the call to OnStart() will return immediately to the SCM. Additionally, if you make this thread a background thread, every time you stop your service, the thread will also die; this way you may not need to provide any functionality in your OnStop() method.
Title: Great one...   
Name: Sandeep Acharya
Date: 2006-12-05 9:47:00 PM
I had no hands on windows services till now and very soon I am going to start working on this for some urgent requirement. And I must say that this article will help me a lot. I could able to develope a dummy one by refering to this article.

Thanks for publishing such useful articles.
Title: Making it Easier   
Name: Ambrose
Date: 2006-12-05 3:44:22 PM
Might want to also consider things that raise the abstraction level:

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-06-22 9:50:35 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search