Implementing WCF Service Part 5 - Fault Contract

by Vishwa 24. March 2008 17:49
In WCF, there are five major contracts – Service Contract, Operation Contract, Data Contract, Fault Contract and Message Contract. In my previous examples I used first three. In this example, I will implement the Fault Contract. I am not very fond of using Message Contract as some guidelines suggest using the least or based on requirement, however you cannot get away from the first four contracts. In the event of Fault (exception), WCF throws a fault containing detail error message which you may not like to be passed back to the caller. In other words, this example focuses on how to hide full error details and provide a custom error code, message and details. You can use multiple Fault Contracts on one Operation Contract in similar way. This example provides a simple and generic way to handle Faults. [More]

Tags:

.NET

About Me

Me Hello,my name is
Vishwa Mohan Kumar, PMP
MCP SOA Certified Architect
I am a Software Architect. This blog is result of my experiments.

Flickr Photos

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

Archive

Recent Comments

Comment RSS

Live Traffic Feed