Tech News

What are windows services? How are they differ from other .NET application? How to create Windows Service in c# ?

Microsoft Windows services, formerly known as NT services, enable you to create long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. These features make services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer.


The main difference between a service and an ordinary windows app
  • Services always run (usually started when computer boots; depending on design, you can manually stop or start these)
  • Services have no UI (If you want to show UI from a service, you need to do it via a separate process) and mostly do not interact directly with users
  • Services run in a separate Windows session (mostly, session 0) and, therefore, are (most always) shared between all users of a computer
  • Services may offer recovery actions (what to do on first, second, and subsequent failures)
  • Services are a bit harder to write and especially to debug. Thus, if thinking of writing a service, please consider console app + scheduled task first windows service vs scheduled task
Refer below link :

http://www.aspdotnet-suresh.com/2011/06/creating-windows-service-in-c-or.html


http://www.csharp-examples.net/create-windows-service/

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x