I have created windows service via Visual Studio. The service is running ftp server. I have the same program in .exe app which works perfectly fine. However, the service crashes in after a while. I doesn't even get into the OnStop/OnShutdown event, just stops working. Any ideas?
After doing this myself recently, here is a way of making sure the service restarts after its own crash:
Go to Start - > Control Panel and select Administrative tools in the window. Then, select services and right click on the service you'd like to customize. Under the recovery tab you can set the first failure to restart the service, along with the second and subsequent failures.