जगदीश खोलिया: Address header in WCF
Showing posts with label Address header in WCF. Show all posts
Showing posts with label Address header in WCF. Show all posts

Monday, June 4, 2012

Address header in WCF

Address Header contains the information which is sent with every request, it can be used by either end point service or any intermediate device for determining any routing logic or processing logic.

WCF provides AddressHeader class for this purpose.

Example :

AddressHeader addressHeader= AddressHeader.CreateAddressHeader("Name of the header", "Information included in header ");

Once the AddressHeader instance is created, it can be associated with end point instance as follows :

EndpointAddress endpoint = new EndpointAddress(new Uri("http://myserver/myservice"), addressHeader);