I am using "Renci.SshNet" component in window service. The CLR tries to recover the memory allocated to object of this component and some time it gives error but this error is not caught in try catch
block anywhere, so window service is stopped abnormally.
I found following information in event viewer when service was stopped.
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Net.Sockets.SocketException
First i want to know " why this error is coming"
and for workaround
I want to know "How I can catch this error and stop the abnormal shutdown of window service"?