WCF client using basic HTTP authentication
Posted
by AZ
on Stack Overflow
See other posts from Stack Overflow
or by AZ
Published on 2010-05-20T15:58:16Z
Indexed on
2010/05/20
16:00 UTC
Read the original article
Hit count: 265
I'm trying to connect to a service that uses basic HTTP authentication. I've configured my binding like this
<bindings>
<basicHttpBinding>
<binding name ="binding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
and i'm setting the credentials like this:
client.ClientCredentials.UserName.UserName = Settings.UserName;
client.ClientCredentials.UserName.Password = Settings.Password;
Sill when i make a request i get a "The HTTP request is unauthorized with client authentication scheme 'Basic'" fault back.
What am i doing wrong? (i don't have control over the service so all solutions must relate to the client configuration)
© Stack Overflow or respective owner