我有一個使用自簽名證書在IIS 7中運行的WCF Web服務(這是驗證這是我想要的路線的概念證明)。它需要使用SSL。是否可以強制WCF測試客戶端接受自簽名證書?
是否可以使用WCF測試客戶端調試此服務而不需要非自簽名證書?
當我嘗試我得到這個錯誤:
Error: Cannot obtain Metadata from https:///Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https:///Service1.svc Metadata contains a reference that cannot be resolved: 'https:///Service1.svc'. Could not establish trust relationship for the SSL/TLS secure channel with authority ''. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.HTTP GET Error URI: https:///Service1.svc There was an error downloading 'https:///Service1.svc'. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.
編輯:這個問題是特別關於使用WCF測試客戶端測試使用自簽名證書通過SSL已經獲得的網絡服務。服務器已經設置爲接受任何提供的證書,這是WCF測試客戶端,我沒有看到這樣做的方法。
我沒有看到任何方式將此代碼添加到WCF測試客戶端(我不控制的代碼)。我已經將此調用添加到我自己的代碼(服務器端)。 – 2010-05-10 15:06:56
當然,如果您試圖強制任何其他C#WCF客戶端接受自簽名安全證書,這是正確的方法。 – stephen 2014-07-25 21:31:17