Please go thru this http://www.codeproject.com/Articles/555415/A-Beginners-Tutorial-for-Understanding-Exception-H
. It's written nicely.
In short, if the client app(s) wants to get the reason for the precise exception cause, FaultException
which happens through FaultContract
finds it's place. Another way to achieve the precise server exception (but please never do this in a production environment) is to set
<serviceDebug includeExceptionDetailInFaults="true" />
In production environment, must should set it to False.
N.B.~ Though you have not asked, but still I would like to mention at this juncture that in the production environment, please enable Tracing
) and log the errors(You may use Log4.net /NLogger or may enable the Trace Listeners or can write in the Message Queue...any thing of your choice).
Hope this helps.
Let us know if you need further assistance for understanding the concept.
Thanks.Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator