Running as a Service

Running as a Service

Run your application using the /install parameter (you can make a batch file for this task or simply create a Windows shortcut and add the parameter to the shortcut). This will make the application to be installed as a Windows Service. If your application installed successfully, you will see the following dialog. If this dialog does not appear, the service has not been installed.

From Vista forward, services must be installed while running with specific administrator permissions. Installing without administrator elevation will not produce any error, but no dialog will appear. Take caution to change the shortcut to “Run as Administrator” or start the command prompt with administrator privileges.

Installing a service will not start the service although it will be set to AutoStart. Reboot your server or open the Services Manager and start the application manually. You can also start the application by issuing “net start <servicename>” as an administrator.

Now your application is ready to receive users requests.

For more information about Windows Services and how to manage them, please check Windows Services.

To uninstall your application from the Windows Service list, run the application using /uninstall.

For installing a new version of your application, you need to open the Services Manager and stop the service of your application before replacing the Executable file. After that, you can restart the service again.