Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Service cannot start
Message
 
À
19/09/2010 17:01:15
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01481547
Message ID:
01482001
Vues:
70
>>Are you specifying the full path? Windows services don't start up in the same folder that the DLL is located in. I think it defaults to something weird like \Windows\System32
>
>I have two Windows Services. One is Local Service and the other is Local System. Both do not have any rights when the OS tries to start them. Worst, they cannot have any authorization to write an entry in the Event Viewer. In the first line of that method where it doesn't work, I tried to log in into the Event Viewer. It ended up in the same result as well. What else could be a factor here?
>
>BTW, both services reside on drive E:. The OS is on drive C:. That's the only thing I could see. Are we forced to install our services on drive C:?

Bonnie already chimed in here, but writing to the Event Log is definitely disallowed by default - you have to explicitly add permission to allow this.

One thing I do when trying to debug Windows services is to add a line like this which adds a delay to the startup, giving me time to attach a debugger.
System.Threading.Thread.Sleep(30 * 1000);
I'll add this before my service attempts to do anything. Then I can start the service up and in Visual Studio click on .Tools > Attach to Process, find my process and click Attach. Set a breakpoint on the line immediately following the Sleep and when the timer expires you can walk through the code to see what's happening.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform