【问题标题】:The Security Support Provider Interface (SSPI) negotiation failed with WCF service in IISIIS 中的 WCF 服务的安全支持提供程序接口 (SSPI) 协商失败
【发布时间】: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


    【解决方案1】:

    在尝试了许多解决方案之后,我认为至少通过将安全模式设置为无,我可以让事情在此期间正常工作:

    <bindings>
      <wsHttpBinding>      
        <binding name="myBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">         
          <readerQuotas maxDepth="200" maxStringContentLength="8388608" maxArrayLength="16384" maxBytesPerRead="2147483647" maxNameTableCharCount="16384" />
          <security mode="None" />
          <reliableSession enabled="true" />
        </binding>
      </wsHttpBinding>
    </bindings>
    

    【讨论】:

      猜你喜欢
      • 2011-04-01
      • 2014-05-31
      • 2011-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多