Hi,
I am consuming a web-service in an ASP.Net page.
<bindings><basicHttpBinding><binding name="BasicHttpBinding_Service1"><security mode="Transport"><transport clientCredentialType="Basic" /><message clientCredentialType="UserName" /></security></binding></basicHttpBinding></bindings>
client.ClientCredentials.UserName.UserName = "domain\user"; client.ClientCredentials.UserName.Password = "pwd";
contract = client.MyServiceMethod(callContext, parameter1, parameter2);
at the above line I get the following error message:
The HTTP request is unauthorized with client authentication scheme Basic. The authentication header received from the server was Basic realm="MySite.com".The server config file has:
<bindings><basicHttpBinding><binding name="service1"><security mode="Transport"><transport clientCredentialType="Basic" /></security></binding></basicHttpBinding></bindings>
P. S. I am not a regular ASP.Net/ Visual C# developer.
Regards,
Abhinay