Sometimes I see that some applications allow themselves to be run as a service on Windows, for example Apache HTTP Server allows that. I always ran it as a regular application and never experienced any problems or limitations.
- What are the advantages of this?
- Is there anything that applications is allowed to do or have when it’s run as a service?
- What are the advantages for me as a developer, when I write a service vs. a regular application.
The biggest benefit to running an application as a service is that it will continue running even after the current user logs off (and will start running before a user logs on). Also, services normally run under a local “System” account instead of running under the login of a particular user (although services can, and often are, configured to run under a specific user login, usually dedicated to that purpose).
As a developer, you probably won’t notice a lot of difference. Processes running on the desktop are usually easier to debug if something goes wrong. Normally you would set up your application to be able to run in either mode, making it both easy for development and appropriate for deployment.