Venktesh
Venktesh

Reputation: 75

Installing windows service in windows server 2012

I have installed a Mail service in windows server 2012. The service seems to be running but the onstart event is not firing. I have set the logon account using a domain user. I have installed another service which seems to be working fine. The only difference between the 2 services is that d mail service has some DB activities. Can anyone help me with this ??

Upvotes: 0

Views: 1098

Answers (1)

Volkan Paksoy
Volkan Paksoy

Reputation: 6977

Debugging Windows services is really hard, especially when the problem is at OnStart method. I'd strongly recommend using TopShelf: http://topshelf-project.com/

This way you can develop your service as console application which is easy to debug. I'm sure you'd be able to easily spot the problem if you can debug the method.

To install the application as a Windows service all you have to do is run

{Your.service.exe} install

For details of command line options check out: http://topshelf.readthedocs.org/en/latest/overview/commandline.html

Upvotes: 1

Related Questions