WCF身份检查失败

时间:2010-08-19 02:53:45

标签: c# wcf

连接到我的网络服务时,我一直收到此错误

传出消息的身份检查失败。预期身份是“http://schemas.xmlsoap.org/ws/2005/05/identity/right/possessproperty”目标端点的“身份(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upnhttp://qbes:3790/Bullfrog/QBService/QBService)”。

我唯一能让它发挥作用的是我将自己的身份设置为我的电子邮件地址。我不知道为什么这会起作用我只是在尝试它而且它起作用了。但是当我将客户端应用程序发布到我的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>

1 个答案:

答案 0 :(得分:4)

您的客户端端点配置指定了服务的预期标识。用户主体名称标识检查用于运行服务的用户帐户。该帐户必须以UPN格式指定,其格式与email:userName @ domain的格式相同。我希望该服务在您的用户帐户下运行,这样就可以在您输入电子邮件时使用该服务。

相关问题