Sign In
Nicholas Allen's Indigo Blog
Windows Communication Foundation From the Inside
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
Answers
Bindings
Channel Extensibility
Channels
Conferences
Contracts
Debugging
Encoders
Faults
Hosting
HTTP
Indigo
Learning
Message Security
Messages
Net4
Networking
Orcas
Pages
Performance
Proxies
Queues
Releases
Reliable Messaging
Security
Security Algorithms
Serialization
Service Architecture
Service Model
Silverlight
Standards
Stream Upgrades
TCP/IP
Transport Security
Transports
Browse by Tags
MSDN Blogs
>
Nicholas Allen's Indigo Blog
>
All Tags
>
faults
Tagged Content List
Blog Post:
Distinguishing Messages
Nicholas Allen
Can I have two operations with the same name but different calling conventions use the same action? No, the point of the action property on a message is to guarantee that the message contains sufficient information to distinguish which operation it should be associated with. It would be of no benefit...
on
24 Mar 2009
Blog Post:
Reliable Authentication Delays
Nicholas Allen
Why does turning on reliable sessions sometimes cause the client to take much longer to fail an authentication check? As part of doing an authenticated operation, the client must send a request to the server that contains information about the client's identity. This is just an abstract description...
on
18 Dec 2008
Blog Post:
Exceptions in Transactions
Nicholas Allen
I have a service operation that throws an exception to return an error back to the client. When the service operation is transactional, the transaction is aborted after calling this operation. How do I return the error under the transaction? A service operation call fails when the invoked method...
on
11 Dec 2008
Blog Post:
Fault Serialization with XmlSerializer
Nicholas Allen
About 20 posts ago, back before PDC, this was the next topic in the queue to be posted. It has been somewhat delayed by all of the talk of product announcements and details about future releases. Since it was becoming lonely and forgotten I thought I'd get back onto talking about the product that you...
on
10 Dec 2008
Blog Post:
Using Faults with Untyped Messages
Nicholas Allen
When using a typed contract, incoming messages on the server are shredded on your behalf to be turned into method calls and parameters. Ordinarily, the particular method call selected for an application messages will have the same parameterized contract as the message. This allows the transformation...
on
15 Aug 2008
Blog Post:
Avoid Exceptions in Faults
Nicholas Allen
FaultException supports both an untyped variant, for when you don't have any particularly interesting detail to provide, and a typed variant, for when you do. Don't use a subclass of Exception as the type of a typed FaultException. Here's why. When you use a typed FaultException, you are creating...
on
20 May 2008
Blog Post:
Writing Multiple Detail Elements in Faults
Nicholas Allen
How do I create a fault with multiple child nodes for the detail element? All of the overloads of CreateFault take a single argument for detail, which lets me build a tree of nodes but not a forest. The trick here is not to get hung up on trying to make the built-in convenience methods work. The...
on
3 Apr 2008
Blog Post:
Using Call Context Initializers for Culture
Nicholas Allen
Let's build on a few earlier samples to actually demonstrate a working call context initializer. I'll start with yesterday's skeleton for a call context initializer and behavior . To that skeleton I'll add implementations of BeforeInvoke and AfterInvoke that initialize the operation thread with custom...
on
26 Feb 2008
Blog Post:
Embedding Arbitrary XML in Faults
Nicholas Allen
How can I directly craft the XML content that goes into a fault detail? Getting control over the detail element doesn't have to mean crafting the fault message yourself. While WCF requires that the fault detail be serializable using a data contract, remember that DataContractSerializer treats XmlElement...
on
20 Feb 2008
Blog Post:
Increasing the Maximum Fault Size
Nicholas Allen
When the service sends a fault message with a large detail, my client is unable to read the fault. Changing the standard settings for the maximum message size doesn't help. How can I read large fault messages? Fault messages have their own special quota that can be configured on the client proxy...
on
7 Aug 2007
Blog Post:
A Trick with Faults (Discussion)
Nicholas Allen
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, the service call completes normally. The return...
on
28 Feb 2007
Blog Post:
A Trick with Faults
Nicholas Allen
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 { public Message Verb(Message input) { throw...
on
27 Feb 2007
Blog Post:
Actions for FaultExceptions
Nicholas Allen
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, FaultReason reason, FaultCode code, string...
on
5 Feb 2007
Blog Post:
Errors Without Context
Nicholas Allen
I don't know how many people use the code I post, but I frequently stumble across peculiar or interesting behavior while trying to get the snippets working. If the behavior relates to the topic I'm trying to explain, then it goes in the article. If the behavior is something off to the side, then I'll...
on
25 Jan 2007
Blog Post:
Modifying HTTP Error Codes, Part 2
Nicholas Allen
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 for channels rather than services...
on
24 Jan 2007
Blog Post:
Modifying HTTP Error Codes, Part 1
Nicholas Allen
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 because it's not clear at all from programming...
on
23 Jan 2007
Blog Post:
Designing New Faults
Nicholas Allen
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 to be acted on programmatically, and that your...
on
5 Jan 2007
Blog Post:
Faults and HTTP
Nicholas Allen
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 the normal message payload. Although we don't send...
on
4 Jan 2007
Blog Post:
Zen Faults
Nicholas Allen
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 to intuit that a fault has occurred based on the other...
on
3 Jan 2007
Blog Post:
Consuming Faults, Part 2
Nicholas Allen
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 own FaultConverter in a custom channel to control...
on
29 Dec 2006
Blog Post:
Consuming Faults, Part 1
Nicholas Allen
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 through an instance of FaultConverter. You can...
on
28 Dec 2006
Blog Post:
A Historical, Awkwardly Named Fault
Nicholas Allen
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 of a name: the InvalidCardinalityAddressing...
on
27 Dec 2006
Blog Post:
The Most Distinguished Fault
Nicholas Allen
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 by the default fault converter, and even gets a mention...
on
21 Dec 2006
Blog Post:
Creating Faults, Part 3
Nicholas Allen
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 talked about last time. In addition to the fault code...
on
19 Dec 2006
Blog Post:
Creating Faults, Part 2
Nicholas Allen
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 simpler of the two. The fault reason is the...
on
14 Dec 2006
Page 1 of 2 (29 items)
1
2