我有一個WPF應用程序,並且我使用WCF通過https使用php webservice,我在服務器上創建了一個自簽名證書來測試它並進行配置客戶端使用此證書,但出現異常並告訴我需要通過客戶端證書。WCF - 通過HTTPS消費SOAP服務 - 請求超時
其實我只是想保護傳輸的消息,我不需要驗證客戶端,所以我怎麼能禁用客戶端身份驗證。
我正在使用clientCredentialType「Certificate」和.Net 3.5的安全模型「Transport」。
先感謝您的意見..
UPDATE
正如我所提到的,我不需要的服務來驗證,所以我已經使用Transport Security with an Anonymous Client代替Transport Security With Certificate Authentication客戶端的身份,以下是該客戶端配置:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="bindingName" closeTimeout="00:0:04"
openTimeout="00:00:04" receiveTimeout="00:00:04" sendTimeout="00:00:04"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://myServer/myApp/myWebService"
binding="wsHttpBinding" bindingConfiguration="bindingName"
contract="xx.yy" name="zz">
</endpoint>
</client>
現在的問題是:當我打電話給該服務時出現超時錯誤「對{我的服務URL}的HTTP請求已超出分配的超時時間」。
附加信息:服務工作得很好了HTTP,只出現了問題,當我移動到HTTPS,我可以看到該服務的WSDL,如果我通過互聯網瀏覽器中打開它,但瀏覽告訴我,是不安全的資源,我應該強制它向我展示所有資源以查看WSDL。
看來你的問題與WPF無關,所以我將它切換到wcf-security – evgenyl
好的,謝謝@evgenyl – karam