handling sockets when application crashes

  • Thread starter Thread starter ksukat63
  • Start date Start date
K

ksukat63

Guest
I have written a Windows Service in c# that uses a socket to communicate with a desktop application (for diagnostics).

The problem I am having is that if the service crashes and you try to restart it, you get errors and a failed start as the socket are already bound to another applications and can't be rebound <don't have it exact, the message got deleted>. Its in the windows application event viewer. Both apps and processes can be killed off and you still can't start the service again. How can you have the windows service you create take ownership of the sockets ? pointers to the relevant webpage would help. Thanks. Google searches weren't so helpful as I couldn't come up with the correct search terms to turn up a relevant nugget.

Continue reading...
 
Back
Top