views:

256

answers:

1

I am consuming an secured service hosted over basicHttpBinding I have to pass credentials to the service for authenticatioon

Here’s the config setting for the client

<security mode="TransportWithMessageCredential">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>

While calling the service, I am getting following exception message

An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. Message = "An invalid security token was provided (Bad UsernameToken Values)”

I not sure how to get it working I am curious if somebody can help me out or provide me any url where I could find the solution

A: 

When you create your MyServiceClient object you can set the username and password on the clientInstance.Credentials.UserName object.

klausbyskov
yes, I am doing the same
Jason M