Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Service stopping immediately
Message
De
01/09/2013 20:13:24
 
 
À
01/09/2013 19:55:00
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:
01581810
Vues:
29
>I think you missed some of my code. I have two parts, one when running as a Service, uses ServiceBase.Run():

Thanks, I had simplified too much.

This is what I have now:
    Protected Shared Sub Startup(toArgs As String(), toWindowsService As WindowsService)

        ' If this from the Windows Service
        If Not Environment.UserInteractive Then
            Run(toWindowsService)
        Else
            toWindowsService.OnStart(toArgs)
            toWindowsService.OnStop()
        End If

    End Sub

    Protected Overrides Sub OnStart(ByVal toArgs As String())
        MyBase.OnStart(toArgs)
This still works ok from the Services interface. But, when clicking on the EXE, it is still the same thing.

I installed the service with sc. I do not know if this could be a factor.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform