Browsing All Posts filed under »General«

Asynchronous operations in WCF

March 7, 2011 by


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 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 […]

WCF Versioning Guidelines

December 21, 2010 by


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 […]


November 24, 2010 by


In this post I’m going to describe a scenario which we encountered when we had to work with an external partner that expected us to deliver messages in a very specific format and with specific headers. Our first approach was to add the “XmlSerializerFormat” attribute on each operation on the contract, and to add the […]

Adding OperationContextScope to asynchronous methods

November 18, 2010 by


OperationContextScope is usually added in order to add additional information (such as headers) on outgoing requests from the client side. It has two constructors: OperationContextScope(IContextChannel) OperationContextScope(OperationContext) All samples found on the web provide code samples only for cases where the methods on the client side are synchronous, but what if the client API is asynchronous? […]