Thinking about the solution of your problem, recommend running the application as windows service, this way you can configure to start automatically, and if your application comes to fall even with the server turned on, windows service takes care to restart.
Thus, one of the options is NSSM http://nssm.cc/usage.
Download the above website application (is Free) and put in the same folder as your exe.
Then log in to the windows console (cmd), go to the folder that downloaded the file and type:
nssm install servertet
A window will be opened to inform the service parameters, enter the data:
In the Path field, find the servertet.exe file
In the Startupdirectory field leave it the way it filled in, if you want (and know), you can fill in the other fields of the other tabs.
Click Installservice and the service will be installed.
From this moment servertet becomes controlled as a windows service normally.
OBS.: Remember to close the servertet.exe and start as windows service, and test before putting into production.
Thanks for the quick reply buddy! I will try this method, until pq the server runs through a bat file.
– BigSpider
Did it work? If so, could you mark the question as answered? When in doubt, visit the [tour] to find out how to do it. Thank you.
– David