我正在嘗試使用svcutil.exe生成代理代碼。服務在同一個盒子上運行。 這裏是控制檯輸出。任何想法有什麼不對?svcutil生成代理時給出「HTTP獲取錯誤」
SvcUtil.exe https ://xyz:xxx/servicename/wsdl?wsdl
試圖從下載的元數據的 'https:// XYZ:XXX /服務名稱/ WSDL WSDL' 使用WS- 錯誤:無法從https獲取元數據:// XYZ:XXX /服務名稱/ WSDL WSDL
WS-元數據交換錯誤 URI:https://開頭的xyz:XXX /服務名稱/ WSDL WSDL
Metadata contains a reference that cannot be resolved: 'https ://xyz:xxx/servicename/wsdl?wsdl'.
There was no endpoint listening at https://xyz:xxx/servicename/wsdl?wsdl that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
HTTP GET錯誤 URI:https://開頭的xyz:XXX /服務名稱/ WSDL? wsdl
The document was understood, but it could not be processed.
WSDL文檔包含無法解析的鏈接。
下載'https:// localhost:xxx/servicename/wsdl?wsdl = wsdl1'時出錯。
底層連接已關閉:無法建立SSL/TLS安全通道的信任關係。
根據驗證程序,遠程證書無效。
我用xyz和xxx分別替換了機器名稱和端口號。是的,我可以在IE中看到wsdl。我已經從事件查看器中複製了addr,表明它是正確的。 SvcUtil ver:3.0.4506.2152(SP.030729-0100) 服務在Windows服務中運行。 – Stranger 2011-12-22 22:01:58
它只適用於http而不是https? – 2011-12-22 22:21:59
如果ssl證書無效,請參閱:http://stackoverflow.com/questions/1234281/is-there-a-way-to-force-svcutil-exe-to-ignore-ssl-certificate-issues – 2011-12-22 22:24:34