调用WCF出现 The remote server returned an error: (401) Unauthorized. 错误

解决方案:

将配置文件中:

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

更改为:

 <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" proxyCredentialType="Windows"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
 </security>

 

posted @ 2010-06-08 16:43  StarWang  阅读(1049)  评论(0编辑  收藏  举报