How to pass credentials to a SOAP webservice?

前端 未结 1 1833
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 19:32

I am trying to call a SOAP webservice, however I am getting the error: Additional information: The username is not provided. Specify username in ClientCredentials.

S

1条回答
  •  佛祖请我去吃肉
    2021-01-03 20:24

    You'll need to set the credentials on the client, like as shown in this MSDN article:

    client.ClientCredentials.UserName.UserName = "my_user_name"; client.ClientCredentials.UserName.Password = "my_password";

    0 讨论(0)
提交回复
热议问题