首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WCF双工业务中的SOAP安全协商错误

WCF双工业务中的SOAP安全协商错误
EN

Stack Overflow用户
提问于 2011-07-14 12:11:12
回答 2查看 1.3K关注 0票数 0

我正在使用双工通信的WCF服务,并且在通过我的开发机器上的本地主机之外的任何地方工作都有问题。

无论我做什么,都会产生以下错误:

{“安全支持提供程序接口(SSPI)身份验证失败。服务器可能不在具有身份'host/crpnyciis20e‘的帐户中运行。如果服务器运行在服务帐户(例如网络服务)中,则将帐户的ServicePrincipalName指定为服务器的EndpointAddress中的标识。如果服务器运行在用户帐户中,则将帐户的UserPrincipalName指定为服务器EndpointAddress中的标识。”

我的服务Web.config如下:

代码语言:javascript
复制
<?xml version="1.0"?>
<configuration>    
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <protocolMapping>
      <add scheme="http" binding="wsDualHttpBinding"/>
    </protocolMapping>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

我的客户的App.config:

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsDualHttpBinding>
                <binding name="WSDualHttpBinding_IMessagingService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00" />
                    <security mode="Message">
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsDualHttpBinding>
        </bindings>
        <client>
            <endpoint
                binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IMessagingService"
                contract="CTMessagingServiceReference.IMessagingService" name="WSDualHttpBinding_IMessagingService">
                <identity>
                    <userPrincipalName value="nbdfp2k" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

我能做些什么来解决这个问题吗?如果有其他代码有助于诊断,请告诉我.据我所知,其余部分都与连接配置无关。

EN

回答 2

Stack Overflow用户

发布于 2012-05-10 19:30:25

不确定这是否会解决您的问题,但您正在丢失客户端点中的地址以及绑定配置中的client地址(它应该与您的端点地址不同)。

票数 1
EN

Stack Overflow用户

发布于 2014-01-04 04:36:21

不确定这是否是理想的方法,但您可以尝试从客户端配置中删除以下"identity“节点-

代码语言:javascript
复制
<identity>
     <userPrincipalName value="nbdfp2k" />
</identity>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6692910

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档