Hi, I have created a window services in vb.net and it is installed successfully. But when I start the service, I get the error
error 1053, the service did not respond to the start or control request in a timely fashion
And this is the code..I suspect that the error is because of the code in red text. I have tried to print the log to text file, everything is ok, just the service cannot be started completely when the starting progress near 100%
Public Class Maintenance
Protected Overrides Sub OnStart(ByVal args() As String)
Dim autoEvent As New AutoResetEvent(False)
Dim statusChecker As New clsStatusChecker()
Dim timerDelegate As TimerCallback = AddressOf statusChecker.CheckStatus
Dim stateTimer As Timer = New Timer(timerDelegate, autoEvent, 0, 1000)
autoEvent.WaitOne(Timeout.Infinite, False)
stateTimer.Dispose() End Sub
Protected Overrides Sub OnStop()
End Sub
End Class
Public Class clsStatusChecker
Sub New()
intLock = 0
End Sub
Sub CheckStatus(ByVal pobjStateInfo As Object)
.....
End Sub
End Class