What is Address Header in WCF?

 Posted by Prasham on 10/22/2010 | Category: WCF Interview questions | Views: 10758 | Points: 40

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);


| Alert Moderator 

Comments or Responses

Login to post response