I am developing a C# web client application which receives the content from a web server and displays it using a brower object after successful authentication. Ideally, when ever the application is exited and it needs to unsubscribe to network connection, we should call the method Unadvise(cookie) of IConnectionPoint. But when any web exception is thrown and the application needs to be closed, the application is not responding and it is not able to exit. When I comment the method Unadvise(cookie) it is working fine and the application is exiting succesfully.
Is there a way to solve the problem without commenting Unadvise(cookie)? .
I think You can use multithreading – isolated thread for that call of unadvise, which you can kill on timeout.