User run server giving error

48 views
Skip to first unread message

Cam Evenson

unread,
Nov 14, 2021, 11:30:25 PM11/14/21
to topshelf-discuss
When the service installed under local service it runs but can not connect to any databases.   But when I install the service using a username and password which has database access the service will not start.  It gives me an error saying it can not start.  I’m very new to C# and topshelf and confused.  Do I need to specify a username already when I compile?  

Kind of under the gun to get this service running.  

Cam Evenson

unread,
Nov 15, 2021, 10:44:57 AM11/15/21
to topshelf-discuss
I looked into a few examples with the use of TopShelf and it looks like my problem might be the code placed in the Start method.  I do some database checks on startup and frankly, they are probably timing out the service and not returning that the software has even started.  I need to look into just starting up the timer service first and during the first iteration of the timer to perform the database checks.  I will need to look for how to confirm to the Service caller that the program is running so that it doesn't keep failing every 30 seconds.  Sadly, in some ways, I am happy I converted my code to C# because originally it was in VB.net and would have been a bigger nightmare to troubleshoot and debug.  At least there is a tool like TopShelf to take the headaches out of debugging a service. Now just need to get over the hurtles with startup and I am golden.  
Reply all
Reply to author
Forward
0 new messages