Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Service stopping immediately
Message
From
01/09/2013 20:13:24
 
 
To
01/09/2013 19:55:00
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01581778
Message ID:
01581810
Views:
30
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform