【发布时间】:2016-04-27 08:45:55
【问题描述】:
我在部署 WCF 服务时遇到问题。在开发机器上一切正常。但是,当我尝试通过 http 端口 80 将其托管在具有 IIS 的服务器上时。我遇到了安全问题。
只是复制它会产生错误The request for security token could not be satisfied because authentication failed,我注意到我的 dns 身份是:
<identity>
<dns value="localhost"/>
</identity>
所以我把它改成了:
<identity>
<dns value="ServerName"/>
</identity>
但是,我现在收到了The Security Support Provider Interface (SSPI) negotiation failed(所以它似乎通过了 DNS 身份,问题)。这是我的 web.config 文件中的服务:
<system.serviceModel>
<services>
<service name="WCFDataInterface.Service">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="WCFDataInterface.IService">
<identity>
<dns value="ServerName"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="wsHttpBinding" scheme="http"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
谁能帮忙设置一下?我可以在互联网上找到的所有资源似乎都增加了混乱。我找不到任何方法来解决托管 wsHttpBinding 服务的身份验证问题。
【问题讨论】:
标签: wcf iis wshttpbinding