I\'m attempting to make requests to a client\'s web service (I don\'t know the underlying platform at the client). I\'ve consumed the client\'s WSDL in Visual Studio 2010 using
There are a couple of changes to make.
Firstly, there is a handy constant HttpRequestHeader.Authorization
.
Secondly, are they expecting the header to be Base64 Encoded - this is normally required for basic authentication.
WebClient.Headers.Add(HttpRequestHeader.Authorization,
"Basic " + Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes("12345678901234567890")));