Choosing the right extensibility point

June 3, 2011
by

0

WCF pipeline architecture is very extendable, allowing the developer to hook-in, in various locations and implement a custom logic as needed. As there are so many extendability points and some might seem to overlap. It is sometimes confusing or overwhelming to decide which extensibility method to use and where exactly to hook it. So how […]

Posted in: WCF Extensions

IDispatchMessageInspector –How to change the message on the server side?

May 4, 2011
by

0

IDispatchMessageInspector allows to validate and modify the Message on the server side (similar to IClientMessageInspector, which is added on the client). It’s interface allows you to interfere with the request Message before it arrives to the server, and with the response Message before it is sent to the client. The IDispatchMessageInspector interface contains the following […]

Posted in: WCF Extensions

IEndpointBehavior–How to add behavior on a specific endpoint?

April 30, 2011
by

0

IEndpointBehavior, as its name implies, allows you to add your custom behaviors on the service endpoints both on the client, and on the server. The IEndpointBehavior interface is very similar to the IOperationBehavior interface which was described in the previous post

Posted in: WCF Extensions

IClientMessageInspector – How to inspect and modify the message?

March 29, 2011
by

2

IClientMessageInspector allows to inspect or modify SOAP messages on the client side. Here are some examples of usage for this extensibility point: Message Validation – Ensure the message is compliant with a certain schema Validate its content or headers Logging or Tracing Manipulating the Message (For example: manipulate its headers) Note: Parameters validation is done […]

Posted in: WCF Extensions

Asynchronous operations in WCF

March 7, 2011
by

0

WCF contracts can contain both synchronous and a-synchronous operations. A-synchronous operations must follow the following rules: They must follow the a-synchronous pattern: (see http://msdn.microsoft.com/en-us/library/aa719599(v=VS.71).aspx) The Begin method takes the method parameters, a callback object, and a state object, and returns a System.IAsyncResult The matching End method takes a System.IAsyncResult and returns the return value of […]

Posted in: General

IDispatchMessageFormatter – How to customize reply Messages on the server side?

March 3, 2011
by

0

The IDispatchMessageFormatter extensibility hook is very similar to the client’s IClientMessageFormatter which was described in the previous post iclientmessageformatter. On the server side,  WCF converts requests into Message objects which are later on converted to a strongly typed operation parameters. The IDispatchMessageFormatter allows us to interfere in the later conversion (Message to operation parameters). It […]

Posted in: WCF Extensions

IClientMessageFormatter– How to customize Messages on the client side

February 15, 2011
by

1

WCF allows client side developers to perform communication operations by using strongly typed operations. Internally, WCF translates these strongly typed operations into a generic Message class, which can be used by the WCF client runtime. When sending a message, WCF takes the parameters passed as the client operation parameters and “serializes” them into a Message […]

Posted in: WCF Extensions