這個問題接收的令牌是一種的跟進這個:How to create a .NET client for a wso2 Secure Token ServiceWCF錯誤處理來自安全令牌服務
簡單地說,我想實現一個客戶端在聯邦安全方案的網絡服務。我的客戶端應該調用給定Web服務的方法,使用另一個Web服務提供的安全令牌對自身進行身份驗證(兩種服務都使用wso2平臺實現)。
正如我在上述問題的答案中所述,通過正確的綁定配置,客戶端能夠接收請求的令牌。以下是我綁定配置:
<wsFederationHttpBinding>
<binding name="fs">
<security mode="TransportWithMessageCredential">
<message issuedKeyType="SymmetricKey" issuedTokenType ="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0">
<issuer address =<!-- STS URL HERE--> binding ="customBinding" bindingConfiguration ="StsBinding"/>
<claimTypeRequirements>
<add claimType="http://wso2.org/claims/userid" />
</claimTypeRequirements>
</message>
</security>
</binding>
</wsFederationHttpBinding>
...
<customBinding>
<binding name="StsBinding">
<textMessageEncoding messageVersion="Soap12WSAddressing10"/>
<useManagedPresentation/>
<security authenticationMode="UserNameOverTransport" includeTimestamp ="true" keyEntropyMode ="ServerEntropy" securityHeaderLayout ="Lax"
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" >
</security>
<httpsTransport authenticationScheme ="Basic"/>
</binding>
</customBinding>
然而,當我的客戶過程中收到令牌失敗與SecurityNegotiationException,指出「甕:IssueTokenResponse」行動是錯誤的。這個例外是什麼意思?應該採取什麼正確的行動?
我無法訪問這兩種服務的任何細節,所以我需要知道我是否只能在客戶端執行某些操作。
我曾試圖按照包含在該論壇上發帖https://social.msdn.microsoft.com/Forums/vstudio/en-US/6c838f7e-f72f-4fdd-827d-b29c61522aa0/wrong-action-httpdocsoasisopenorgwssxwstrust200512rstrissue?forum=wcf的建議,但我不認爲它適用於我的情況,因爲沒有一個單一的messageSecurityVersion值似乎工作