Using RealProxy to extend the WCF proxy

January 31, 2011
by

1

In this post, I’m going to demonstrate how to use RealProxy in order to extend the generated client side WCF proxy. RealProxy is defined in the System.Runtime.Remoting.Proxies namespace and is not directly related to WCF, though it is used by WCF internally when generating a client proxy. The WCF client proxy is very extendable via […]

Posted in: Extended WCF

ICallContextInitializer–How to capture the thread’s state?

January 14, 2011
by

0

The ICallContextInitializer located in System.ServiceModel.Dispatcher namespace is used to initialize and restore the thread context (thread local storage, CallContext, etc.) before and after the operation is invoked on the server side. By default, WCF will not do it for you unless you explicitly add this behavior.

Posted in: WCF Extensions

EncoderFallbackException when passing UTF8 characters

January 11, 2011
by

0

Symptom A while ago, in one of our systems which sends text messages over WCF, we encountered a mysterious exception: System.Text.EncoderFallbackException: Unable to translate Unicode character \uD8B8 at index XX to specified code

Posted in: Pitfalls

Catching the real exception …

January 4, 2011
by

2

In the previous post (see whose-fault-is-it), I mentioned that there is a trick you can implement in order to enable your clients catch the exact exception thrown by the server instead of the generic FaultException. This contradicts the WCF pattern according to which the client should catch only FaultExceptions. The reason WCF promotes catching generic […]

Posted in: Error Handling

Whose fault is it?

December 26, 2010
by

0

In this post I’m going to explain what is the SOAP Fault, and how it should be handled. There are 3 types of SOAP messages: Request Reply Fault when the client receives a fault message, it  indicates  that an error occurred on the server side which WCF translated to the client as a fault. It […]

Posted in: Error Handling

IOperationBehavior–How to customize behaviors for the WCF operation?

December 22, 2010
by

1

IOperationBehavior which is located in System.ServiceModel.Description assembly allows to extend the behaviors of operations for both the client and the server sides.

Posted in: WCF Extensions

WCF Versioning Guidelines

December 21, 2010
by

8

Overview Services exist in order to serve external clients. They do so by exposing a wide range of external interfaces which are later used by the clients to interact with the service. After initial deployment, and potentially several times during their lifetime, services may need to be changed for a variety of reasons, such as […]

Posted in: General