Wednesday, May 24, 2017

Unhandled Exception in WCF

If any exception occurred in WCF that is not handled than it break the communication, we can not use the proxy again, to use it we have to new its object again.

Same thing will happen in case of WCF service throwing a .Net exception that's why it is another why a WCF service should not throw a .Net exception.

It is not true for basicHttpBinding because basicHttpBinding does not have session. wsHttpBinding have secure session so in case of wsHttpBinding communication will break.

How to Handle it?

Need to handle exception at service level and should throw FaultException.

No comments:

Followers

Link