调用WCF的问题:调用方未由服务器进行身份验证

酒店产品WCF服务开发完成后,本地部署测试没有异常,数据结果也是对的。

部署到服务器上后出现了意外:调用方未由服务器进行身份验证。

使用下面的处理方法后解决了问题:

在 配置文件的 system.serviceModel 节点里添加以下配置内容

<system.serviceModel>
   <bindings>
      <wsHttpBinding>
        <binding name="NoneSecurity"
          maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="false">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647"/>
          <security mode="None"/>
        </binding>
      </wsHttpBinding>
    </bindings>

</system.serviceModel>

加了一个属性

<endpoint address="" binding="wsHttpBinding" contract="Meiya.Product.BL.Hotel.Public.IStaticDataService" bindingConfiguration="NoneSecurity">

 

 

 

 

posted @ 2012-05-26 15:37  王亚卿  阅读(291)  评论(0编辑  收藏  举报