2010-08-19 90 views
3

當連接到我的網絡服務時,我總是收到此錯誤WCF身份檢查失敗

傳出消息的身份檢查失敗。期望的身份是'http://qbes:3790/Bullfrog/QBService/QBService'目標終端的身份(http://schemas.xmlsoap.org/ws/2005/05/identity/right/possesspropertyhttp://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> 

回答

4

您的客戶端的端點配置指定的服務期望的身份。用戶主體名稱標識檢查用於運行服務的用戶帳戶。該帳戶必須以UPN格式指定,其格式與email:userName @ domain的格式完全相同。我預計該服務正在您的用戶帳戶下運行,這是您輸入電子郵件時能夠正常工作的原因。

+0

非常感謝您的澄清。所以我的問題的下一部分是這個。當我將客戶端發佈到DMZ中的Web服務器時,我收到另一條錯誤消息: SOAP安全協商失敗 安全支持提供程序接口(SSPI)協商 失敗 當然,這與此身份有關。那麼,我需要採取哪些步驟才能讓dmz中的此客戶與服務進行交談。 – twal 2010-08-19 14:44:16

+0

你的DMZ不在域中,不是嗎? – 2010-08-19 14:58:09

+0

你是正確的,它不在同一個域。 – twal 2010-08-19 15:11:53