我有一個WCF服務是:您可以使用SoapUI測試證書保護的WCF服務嗎?
- 使用
BasicHttpBinding
(如果你能回答WsHttpBinding
甚至更好!) - 使用
TransportWithMessageCredential
安全 - 使用,運輸和X.509證書信息安全
我希望能夠使用SoapUI測試此服務。
然而,當我試圖這樣做,似乎超過WCF的消息了SoapUI跡象預計,導致這個錯誤(在應用程序日誌中檢測到啓用ServiceModel審計後):
CryptographicException: Unable to resolve the '#id-100' URI in the signature to compute the digest.
或者,當我使用WsHttpBinding
我得到異常:
MessageSecurityException: The message received over Transport security has unsigned 'To' header.
類似的問題已經提出:
- WCF rejects messages with additional signed elements
- http://connect.microsoft.com/VisualStudio/feedback/details/481030/wcf-signed-parts
- Getting WCF to accept unsigned 'To' Header
這不打我作爲一個 「Java的交談MS WCF」 的問題 - 我有一個Java測試客戶端沒有問題的工作。同樣,我可以使用WCFStorm來測試服務。但是,SoapUI已經成爲事實上的測試標準,特別是對於非Windows用戶。
那麼,有沒有人設法克服這些問題,並使用SoapUI測試證書安全的WCF服務?
感謝
我相信這個問題是無法解決的,根據我自己的測試和250賞金沒有產生一個答案。
的「web.config文件」是動態生成的,但它有效地匹配以下兩種綁定:
<wsHttpBinding>
<binding name="WSHttpBinding_ITwoWayAsync" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="250000" maxReceivedMessageSize="250000"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Certificate" proxyCredentialType="None" realm="" />
<message clientCredentialType="Certificate" negotiateServiceCredential="false"
establishSecurityContext="false"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
<basicHttpBinding>
<binding name="BasicHttpBinding_ITwoWayAsync" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="250000" maxReceivedMessageSize="250000"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Certificate" proxyCredentialType="None" realm="" />
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
可以請你在web.config文件中分享你的system.servicemodel設置嗎? – Nabheet 2012-03-06 21:29:14