kevinf2349
Technical User
I am trying to run a TCP listener as a Windows Service and it is behaving strangely. If I code
Message = " Running on " & shostname.ToUpper
WriteEvent(Message)
' LocalEndPoint = New IPEndPoint(IPAddress, portNo)
Message = "after new endpoint"
WriteEvent(Message)
(note that the LocalEndPoint statement is commented out)
Then I get the "afterr new endpoint" message written to the event log. However if I uncomment the LocalEndPoint statement no further events are written to the log and the service just sits there doing nothing. If I stop it I get my stop event written to the event log.
Any ideas? The code is in a timer event that gets established during the Onstart event for the service.
Message = " Running on " & shostname.ToUpper
WriteEvent(Message)
' LocalEndPoint = New IPEndPoint(IPAddress, portNo)
Message = "after new endpoint"
WriteEvent(Message)
(note that the LocalEndPoint statement is commented out)
Then I get the "afterr new endpoint" message written to the event log. However if I uncomment the LocalEndPoint statement no further events are written to the log and the service just sits there doing nothing. If I stop it I get my stop event written to the event log.
Any ideas? The code is in a timer event that gets established during the Onstart event for the service.