Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Service stopping immediately
Message
De
01/09/2013 19:40:27
 
 
À
01/09/2013 19:13:34
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:
01581778
Message ID:
01581806
Vues:
37
>>We don't need to recompile in order to run the service as a Console app for debugging purposes. Our project is a Console app project and here's what my code looks like:
>
>Thanks, I see you have the option of .OnStart(). This, I wasn't able to make my service run but only by using the Run() approach. See other messages in this thread. It is only when I use the Run() approach, that I was able to start the service successfully from the Services interface. Could it be related to some kind of configuration?


I don't know why the .OnStart() wouldn't work for you.

>Also, when you run yours directly by clicking on the EXE, do you have a Windows form?

No, as I said it's a Console app. You can't have any UI in a Windows Service ... and I'm betting that you might even have problems if you have anything in the code referencing Windows.Forms, even if you only use it when running interactively. The Console app feature works fine. You can use Console.WriteLine() if you want to show message or just use your usual debugging from Visual Studio.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform