Difference between wcf fault exception and normal .net exception

1,744 views

Published on

Difference between WCF Fault Exception and normal .NET Exception

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,744
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Difference between wcf fault exception and normal .net exception

  1. 1. S.No WCF Fault Exception .NET Exception 1 What is WCF Fault Exception ? If we use a raise a fault exception as shown in the below code, our WCF clients will see the complete clear error rather than a generic error as shown in .NET Exception example. throw new FaultException("Divide by zero"); Our WCF client will now see a better error description as shown in the WCF Fault example. Example is provided at the bottom of the table What is .NET Exception ? If we throw a normal .NET exception from a WCF service as shown in the below code snippet. throw new Exception("Divide by zero"); Our WCF client will get a very generic error with a message as shown in the .NET Exception example. Now this kind of message can be very confusing as it does not pinpoint what exactly the error is Example is provided at the bottom of the table Example for WCF Fault Exception: Example for generic .NET Exception: Reference: http://onlydifferencefaqs.blogspot.in/2014/03/difference-between-wcf-fault-exception.html

×