RE: How to add custom HttpHeader on Web Service Client

From: Gary (gary@online.microsoft.com)
Date: 09/25/02


From: gary@online.microsoft.com (Gary)
Date: Wed, 25 Sep 2002 08:10:48 GMT


Override the GetWebRequest method and change the default implemenation as
follows (Just for sample):

protected override WebRequest GetWebRequest(Uri uri)
{
        WebRequest req = base.GetWebRequest(uri);
        WebHeaderCollection col1= req.Headers;
        col1.Add("test", "testValue");
        return req;
}

Gary

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net