2010-08-19 85 views
1

我一直在環顧四周的問題,看看是否有類似的東西已經解決了。 我還沒有找到解決方案,所以希望有人能幫忙,並指出我在正確的方向。WCF svcutil錯誤:無法從本地主機獲取元數據

我有一個服務,我可以成功導航到本地主機上的svc頁面。

https://localhost/WebSite/UploadService/UploadService.svc

可正常工作一樣通過追加?WSDL的URL查看WSDL。

但是我無法使用svcutil生成客戶端代理。

svcutil.exe https://localhost/Website/UploadService/UploadService.svc?wsdl

當我運行這個命令我得到通常

Attempting to download metadata from ' https://localhost/Website/UploadService/UploadService.svc ' using WS-Metadata Exc hange or DISCO. Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation. All rights reserved.

Error: Cannot obtain Metadata from https://localhost/Website/UploadService/UploadService.svc

WS-Metadata Exchange Error URI: https://localhost/Website/UploadService/UploadService.svc

Metadata contains a reference that cannot be resolved: 

' https://localhost/Website/UploadService/UploadService.svc ' . Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost'. 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://localhost/Website/UploadService/UploadService.svc There was an error downloading ' https://localhost/Website/UploadService/UploadService.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.

我走過去this post和試了一下它的輪廓。遵循這些建議後服務器名稱是一致的,但我仍然無法生成客戶端代理文件。

回答

0

好吧,我看看有什麼是現在發生 這是所有關於您在IIS分配證書 如果你希望你的服務是在本地主機在IIS使用的證書起着重要的作用在這裏 ,您的測試證書必須發給本地主機。

相關問題