我有一個帶有basicHttpBinding,消息安全模式和證書客戶端憑證類型的wcf服務。我可以通過wcf客戶端來使用這個服務,但是這個服務也必須在另一個帶有java客戶端的系統中使用。我正在使用soapui進行測試,但是我獲得了空的響應或安全消息錯誤。我已經嘗試variuos soapui配置來加載客戶端證書,但沒有一個工作。我通過http(非https)公開了服務,這是服務器wcf配置:與客戶端證書身份驗證的WCF與soapui不起作用
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicEndPoint" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647"/>
<security mode="Message">
<message clientCredentialType="Certificate" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="customBehavior">
<clientCredentials>
<clientCertificate findValue="ClientSide" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/>
<serviceCertificate>
<defaultCertificate findValue="ServerSide" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/>
<authentication certificateValidationMode="PeerOrChainTrust"/>
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<endpoint address="http://localhost:8080/WebServices/ExternalServices.svc"
behaviorConfiguration="customBehavior" binding="basicHttpBinding"
bindingConfiguration="basicEndPoint" contract="ServiceReference1.IExternalServices"
name="BasicHttpBinding_IExternalServices" >
<identity>
<certificateReference findValue="ServerSide" storeName="My" storeLocation="LocalMachine" x509FindType="FindBySubjectName" />
<dns value="ServerSide"/>
</identity>
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</client>
</system.serviceModel>
這個設置有什麼問題? 在此先感謝
感謝您的回覆。我已經嘗試過這些配置;在使用basichttpbinding之前,我已經使用https設置了wshttpbinding,並且選擇了密鑰存儲和密碼,但沒有成功。谷歌搜索,我讀到wshttpbinding不是很好的互操作性,所以我改變它basichttpbinding和嘗試沒有https。我很想知道是否有某些地方存在一些關於如何使用soap wcf身份驗證證書開發服務的官方指南,這些證書不僅與wcf客戶端兼容。 – VariableName
@VariableName我有一些關於PKI,SSL等的知識。但正如我在答案中所說的,我沒有* WCF *的混合體驗......我想這個主題肯定有gudelines,但我不'不知道在哪裏可以找到它,對不起。 – albciff