Click here to Skip to main content
15,936,119 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
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)?
Posted
Comments
Himanshu Kumar Patel 27-Jun-11 7:14am    
Would there be a problem if I don't call Unadvise() before exiting the application ?
Sergey Alexandrovich Kryukov 27-Jun-11 17:44pm    
Hard to say without looking at your code.
--SA

1 solution

Perhaps you could wrap the Unadvise(cookie) call in a try-catch and use that to debug what is really going on. That way you'll have a much better idea of what is breaking.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900