What is Fault exception in WCF?Difference between fault exception and .net exception?Here I am going to explain what is Fault exception and how it will differ from the normal dotnet exception.Errors and exceptions are part of programming life.when we get error in wcf we should propagate that error to the wcf client so they can accordingly take action . As we all know life is not simple in wcf . Our normal dotnet exception handling will not work in wcf. If we are handing the exception same as in .net we won’t get the complete messages what wcf returns.
let us see why wcf does not proving the error message while we using the normal exception method. WCF communication with Clients using XML(SOAP)standers. that means even if you want to raise even a exception message that also should be in a xml format.while you handing the exception with normal .net techniques the error messages won’t be in the xml format. So that the proper communication will not happen. For that we have to use the fault exception.
So rather than using the normal exception mechanism we can use the Fault exception in WCF .That means If you want to handle the exception with the Service or with in the .net code then you can use the normal exception , but if you want to propagate that error to the Client then you have to go for the Fault Exception.