How to pass user credentials to web service?

前端 未结 2 455
春和景丽
春和景丽 2020-12-29 11:38

I am consuming a webservice using WSDL in windows application. When I try to use method, i get the following error:-

The HTTP request is unauthorized

2条回答
  •  一整个雨季
    2020-12-29 12:14

    You can try to genereate your service client proxy using the method mentioned here. Once you have an instance of your WCF client proxy, it will have a property ClientCreditials which you can populate as needed. Hope this helps.

提交回复
热议问题