Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Messages » Faults   (RSS)

A Trick with Faults (Discussion)

The code yesterday was meant to motivate a side-discussion on how faults get generated and handled between the server and client proxy. If you tried running that sample, then you would have seen that despite the FaultException being thrown on the service,
Posted by Nicholas Allen | 3 Comments
Filed under: , ,

A Trick with Faults

What does this code print? It seems like both choices are quite reasonable. I'll have some discussion about this tomorrow. [ServiceContract] interface IService { [OperationContract(Action= "foo" )] Message Verb(Message input); } class Service : IService
Posted by Nicholas Allen | 1 Comments
Filed under: , ,

Actions for FaultExceptions

What should I set the action parameter to when creating a FaultException? There is indeed a pair of overloads for creating fault exceptions that take an action parameter, although most of the overloads lack this. public FaultException(TDetail detail,
Posted by Nicholas Allen | 2 Comments
Filed under: , , ,

Modifying HTTP Error Codes, Part 2

Let's pick up where we left off last time with the question… How do I modify the HTTP status code that gets sent back with a fault? It's clear that we need to plug into the fault generation process somehow, but in past articles we've only seen fault handling
Posted by Nicholas Allen | 2 Comments
Filed under: , , , ,

Modifying HTTP Error Codes, Part 1

Back to errors and faults for a bit with this two part series on modifying the HTTP status code used for fault messages. First, we'll need some background. What happens at the HTTP level when a web service encounters a problem? That's a good question
Posted by Nicholas Allen | 2 Comments
Filed under: , , , ,

Designing New Faults

The last piece of this eleven part series on fault messages covers advice for channel authors that need to define their own set of faults. Everything here assumes that you're writing a protocol channel, that you have interesting failure cases that need

Faults and HTTP

I left HTTP error codes out of yesterday's post on zen faults because they're representative of a distinct class of out-of-band fault messages. Out-of-band faults map fault information to a transport-specific mechanism that carries the data outside of
Posted by Nicholas Allen | 2 Comments
Filed under: , , ,

Zen Faults

I've been talking about fault messages for a while now, specifically the kind that are sent around as the body contents of a SOAP message. However, some of the most important faults are reported without sending a message at all. In that case, we have
Posted by Nicholas Allen | 3 Comments
Filed under: , ,

Consuming Faults, Part 2

Picking up from last time, we were going to look at consuming exceptions to possibly produce a fault message. The same machinery is used here as for the reverse conversion process . Exceptions go through an instance of FaultConverter, you can create your
Posted by Nicholas Allen | 7 Comments
Filed under: , ,

Consuming Faults, Part 1

The next two episodes are about consuming fault messages and exceptions. Day one covers consuming fault messages and possibly producing an exception. Day two covers consuming exceptions and possibly producing a fault message. Both directions work by going
Posted by Nicholas Allen | 3 Comments
Filed under: , ,

A Historical, Awkwardly Named Fault

The second most distinguished fault, with almost as many special cases and discussion as the MustUnderstand fault I talked about last week, ended up not making it into the product. Some form of the fault is still in there of course, but it lost its mouthful
Posted by Nicholas Allen | 3 Comments
Filed under: , ,

The Most Distinguished Fault

There is one fault that distinguishes itself from all the rest by the level of support built in for it throughout the platform. This fault has its own attribute, its own behavior, works with any transport or protocol, is one of the few faults handled
Posted by Nicholas Allen | 4 Comments
Filed under: , ,

Creating Faults, Part 3

A fault code is an opaque string that classifies an error. The fault code string doesn't have to be meaningful, it could be "X", but having short yet meaningful strings can aid the debugging experience. The real meaning is in the fault reason that we
Posted by Nicholas Allen | 4 Comments
Filed under: , ,

Creating Faults, Part 2

Let's carry on with some discussion of the FaultCode and FaultReason classes. I was planning to do these two types together but I decided to do them as separate articles and make each of them a bit more detailed. I'll start with FaultReason as it's the
Posted by Nicholas Allen | 5 Comments
Filed under: , ,

Creating Faults, Part 1

I promised to start going over the object model for faults today, and I've split that coverage into two parts. The first part highlights the MessageFault class and creating fault messages (yes, it's a bit confusing that those are separate things). The
Posted by Nicholas Allen | 5 Comments
Filed under: , ,
More Posts Next page »
 
Page view tracker