2011-03-31 23 views
4

我試圖消耗WCF的IBM DataPower的3.7.1.x Web服務得到以下錯誤信息:與WCF客戶IBM DataPower的3.7.1.x問題

無法找到該令牌認證'System.IdentityModel.Tokens.X509SecurityToken'令牌類型。根據當前的安全設置,該類型的令牌不能被接受。

HTTP響應回到200,我可以在Fiddler中調試時看到正確的SOAP響應。

但是,WCF客戶端似乎並不知道如何處理SOAP響應中的BinarySecurityToken元素。

這裏是我的WCF配置:

<bindings> 
    <basicHttpBinding> 
     <binding name="TestBinding"> 
     <security mode="TransportWithMessageCredential"> 
      <message clientCredentialType="Certificate" /> 
     </security> 
     </binding> 
    </basicHttpBinding> 
    </bindings> 

    <behaviors> 
    <endpointBehaviors> 
     <behavior name="TestBehavior"> 
     <callbackDebug includeExceptionDetailInFaults="true" /> 
     <clientCredentials> 
      <clientCertificate storeLocation="LocalMachine" 
          storeName="My" 
          x509FindType="FindBySubjectName" 
          findValue="test-cert" /> 
      <serviceCertificate> 
      <authentication certificateValidationMode ="PeerOrChainTrust" /> 
      </serviceCertificate> 
     </clientCredentials> 
     </behavior> 
    </endpointBehaviors> 
    </behaviors> 

    <client> 
    <endpoint address="https://serviceURL" 
       binding="basicHttpBinding" 
       bindingConfiguration="TestBinding" 
       behaviorConfiguration="TestBehavior" 
       contract="ContraceGoesHere" 
       name="ContraceNameGoesHere" /> 
    </client> 

我見過的其他人報告既微軟和IBM類似的問題也有一些關於它的StackOverflow的問題,但我還沒有找到一個單一的解決方案,作品。

任何幫助,將不勝感激。

+0

很多回後與Yaron Naveh一起,我終於做到了。如果有人遇到同樣的問題 - 請聯繫Yaron或我自己,我們可以指導您完成解決方案。 – YONDERBOI 2011-04-01 00:51:48

回答

3

請發佈您發送的肥皂,返回的肥皂和您的配置。

也嘗試添加該屬性:

<security allowSerializedSigningTokenOnReply="true" /> 

(如描述here

+0

感謝您的快速回復。你搖滾!我已經通過電子郵件向您發送了我的配置文件和SOAP請求/響應片段。試圖找出如何將basicHttpBinding轉換爲customBinding,以根據您的博客文章設置allowSerializedSigningTokenOnReply。 – YONDERBOI 2011-03-31 19:00:18