A
Anil Gupte
I am having a problem getting a service to stay on and I cannot debug it. I
installed it on a computer using installutil.exe In the Services list, it
appears just fine, and I can hit start. However, I get a message saying
"The MediaEncoder Service on Local Computer started and then stopped. Some
services stop if they have nothing to do, for example the Performanace logs
and Alerts service". How can it "have nothing to do"? Mine should do
something! So at least I can then debug it. My code looks like this:
Imports System.ServiceProcess
Imports System.Data.OleDb
Imports WMEncoderLib
#Region " Component Designer generated code "
Public Class MediaEncoderService
Inherits System.ServiceProcess.ServiceBase
Dim WithEvents MediaEncoder As WMEncoder
Protected Overrides Sub OnStart(ByVal args() As String)
MediaEncode()
End Sub
Private Sub MediaEncode()
' My main processing happens here
End Sub
End Class
I even tried putting in a msgbox("Test", OKOnly) in the OnStart event, but
no luck.
So, I can't debug it because it won't even stay started. The install gives
no errors. I am stumped.....
P.S. The onstop event is empty...
Any help appreciated
installed it on a computer using installutil.exe In the Services list, it
appears just fine, and I can hit start. However, I get a message saying
"The MediaEncoder Service on Local Computer started and then stopped. Some
services stop if they have nothing to do, for example the Performanace logs
and Alerts service". How can it "have nothing to do"? Mine should do
something! So at least I can then debug it. My code looks like this:
Imports System.ServiceProcess
Imports System.Data.OleDb
Imports WMEncoderLib
#Region " Component Designer generated code "
Public Class MediaEncoderService
Inherits System.ServiceProcess.ServiceBase
Dim WithEvents MediaEncoder As WMEncoder
Protected Overrides Sub OnStart(ByVal args() As String)
MediaEncode()
End Sub
Private Sub MediaEncode()
' My main processing happens here
End Sub
End Class
I even tried putting in a msgbox("Test", OKOnly) in the OnStart event, but
no luck.
So, I can't debug it because it won't even stay started. The install gives
no errors. I am stumped.....
P.S. The onstop event is empty...
Any help appreciated