【问题标题】:WCF Identity check failedWCF 身份检查失败
【发布时间】:2011-03-31 21:48:20
【问题描述】:

连接到我的网络服务时,我不断收到此错误

外发消息的身份检查失败。对于 'http://qbes:3790/Bullfrog/QBService/QBService' 目标端点,预期的身份是 'identity(http://schemas.xmlsoap.org/ws/2005/05/identity/right/possessproperty: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn)'。

如果我将我的身份设置为我的电子邮件地址,我唯一可以让它工作的时间。我不知道为什么这行得通,我只是在尝试一些事情并且它奏效了。但是,当我将客户端应用程序发布到我的 Web 服务器时,该电子邮件身份不再有效,并且我得到了同样的错误。 我在这里做错了什么? 这是我的配置部分。 谢谢!!!

 <system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_IQBService" 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"
        allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
          enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true"
            algorithmSuite="Default" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="http://QBES:3790/Bullfrog/QBService/QBService"
      binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IQBService"
      contract="IQBService" name="WSHttpBinding_IQBService">
    <identity>
      <userPrincipalName value="twaldron.Bullfrogspas" />
    </identity>
  </endpoint>
</client>

【问题讨论】:

    标签: c# wcf


    【解决方案1】:

    您的客户端端点配置指定了服务的预期身份。用户主体名称身份检查用于运行服务的用户帐户。该帐户必须以 UPN 格式指定,该格式确实与电子邮件格式相同:userName@domain。我希望该服务在您的用户帐户下运行,这就是您键入电子邮件时它工作的原因。

    【讨论】:

    • 非常感谢您的澄清。所以我的问题的下一部分是这个。当我将客户端发布到 DMZ 中的网络服务器时,我收到另一条错误消息: SOAP 安全协商失败 安全支持提供者接口 (SSPI) 协商失败 当然这与此身份有关。那么我需要采取哪些步骤才能让 dmz 中的这个客户端与服务通信。
    • 您的 DMZ 不在域中,不是吗?
    • 谢谢,我会为我的新问题开一个新帖子,因为这是一个不同的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-13
    • 2011-07-31
    • 2021-11-20
    相关资源
    最近更新 更多