I've implemented pub/sub framework using ASP.NET, WCF Service with net.tcp binding. I hosted wcf service on IIS7.5. My code was developed under VS2010, Windows7.
My demo application is working fine but I just want to handle the error exception when my wcf service callback to client.
So far, my WCF Service or ASP.NET did not throw any error to screen at all.
here is my step of testing:
started service
opened 2 IE (e.g. UserA and UserB)
both User subscribed to WCF Service
closed UserB (closed IE of B)
tried to send msg from UserA to UserB
UserA could send msg to B but no error was appeared
I expected that it should be some error appear to my face but no...
开发者_运维百科please suggest me how to handle this case?
Thank you
The connection/client lives in IIS on that machine, not your browser. Closing IE will not necessarily close the client instance, meaning the callback will still succeed. If you want to tie the instance to IE, you need to use something like Silverlight to host the callback functionality. Then you should be able to see the behavior you are looking for.
精彩评论