0

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:

  1. started service

  2. opened 2 IE (e.g. UserA and UserB)

  3. both User subscribed to WCF Service

  4. closed UserB (closed IE of B)

  5. tried to send msg from UserA to UserB

  6. 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

4

1 回答 1

1

连接/客户端位于该机器上的 IIS 中,而不是您的浏览器中。关闭 IE 不一定会关闭客户端实例,这意味着回调仍然会成功。如果要将实例绑定到 IE,则需要使用 Silverlight 之类的东西来托管回调功能。然后你应该能够看到你正在寻找的行为。

于 2011-03-30T19:09:57.677 回答