Adding Custom headers from .Net 1.1 client RRS feed

  • Question

  • Hi,

    I have a simple wcf service which uses basicHttp binding, I want to pass few information from client to this service via custom SOAP header. My client is a .net application targetting .Net 1.1, using visual studio I have created the proxy( Added a new web reference pointing to my WCF service) I am able to call methods in the WCF service but not able to pass the data in message header.  Tried to override "GetWebRequest" and added custom headers  in the proxy but for some reason when I tried to access the header using  "OperationContext.Current.IncomingMessageHeaders.FindHeader" it is not thier.

    Any idea how to solve this prob?

    This is how I added the headers

    protected override System.Net.WebRequest GetWebRequest(Uri uri)



    HttpWebRequest request;

    request = (




    "tesData", "test");  

    return request;



    Tuesday, April 27, 2010 11:25 AM