Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

The HTTP request is unauthorized with client authentication scheme Basic. The authentication header received from the server was Basic realm

$
0
0

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


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>