Hello.
I have a little problem. I created a little Service which uses SIP, all works rather well, but when I want to shut it down in the Services panel, it looks as if it's shut down, but in fact it's not:
- when I try want to delete the .DLL file, I can't: the file is still locked
- if I "Start" my Service again, it refuses
I have to wait like ~20s, and then it is really shut down.
When I shut down the Service, and then try to Start it again, in the Event Viewer it says:
Service cannot be started. System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net/Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAdress socketAddress)
at System.Net.Sockets.Bind(EndPoint localEP)
at Microsoft.Rtc.Internal.Sip.TCPListener.Listen(EndP oint endPoint)
etc etc...
Anyway,
- how can I be sure that the sockets I use are "closed" ?
- Where can I put breakpoints in the code to try and see what's still "opened" ? (OnShutdown(), OnExit(), ...) ?
Any tip welcome, thanks.