Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Service and TCP

Status
Not open for further replies.

kevinf2349

Technical User
Sep 12, 2002
367
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top