Unable to debug WCF service message

后端 未结 12 1370
悲哀的现实
悲哀的现实 2020-12-09 15:25

I\'ve got a Visual Studio 2008 solution with a WCF service, and a client.

When I run my client, and call a method from my service I get a message saying \"Unable to

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 15:40

    Add this line of code after you create your service reference in your client.

    MyWCFService.IService _proxy = new MyWCFService.IService();
    _proxy.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
    

提交回复
热议问题