Re: Console App runs OK Windows Service Fails
From: mb (anonymous_at_discussions.microsoft.com)
Date: 05/14/04
- Next message: mb: "Re: .NET Remoting Exception handling"
- Previous message: Joey Fox: "RE: Strong Typed Datasets"
- In reply to: Allen Anderson: "Re: Console App runs OK Windows Service Fails"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 May 2004 13:21:05 -0700
Please see the following code snippet. I had the same problem and with this code snippet it works fine. Hope this helps ...
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
Try
RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ApplicationBase & "\RemoteServer.config")
Catch ex As Exception
EventLog.WriteEntry("Plus App Server: Failed to start the service. Please see the exception details in subsequent log entries..")
EventLog.WriteEntry(ex.Message)
While Not IsNothing(ex.InnerException)
ex = ex.InnerException
EventLog.WriteEntry(ex.Message)
EventLog.WriteEntry(ex.StackTrace)
End While
End Try
EventLog.WriteEntry("Plus App Server started successfully.")
End Sub
Regards
persmb@put this
comcast.net
- Next message: mb: "Re: .NET Remoting Exception handling"
- Previous message: Joey Fox: "RE: Strong Typed Datasets"
- In reply to: Allen Anderson: "Re: Console App runs OK Windows Service Fails"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|