2012-04-03 38 views
1

背景:我一直負責在解決方案上創建單一標誌,將我們的內部用戶重定向到供應商的Web應用程序。我已經將其設置爲一個ASP.Net項目,它將調用供應商提供的Web服務。此服務將返回用於登錄供應商網站的URL和令牌。所有這些都要安全地完成。無法在VS.Net 2010中添加安全的Web引用

問題:當使用Visual Studio的添加Web引用對話框下載WSDL並生成所需的代理類,我得到以下錯誤:

There was an error downloading 'https://server:port/folder/Service?wsdl'. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream. Metadata contains a reference that cannot be resolved: 'https://server:port/folder/Service?wsdl'. An error occurred while making the HTTP request to https://server:port/folder/Service?wsdl . This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream. If the service is defined in the current solution, try building the solution and adding the service reference again.

除了這個錯誤,添加引用按鈕呈灰色,阻止我添加引用並生成代理類。

該項目運行在.Net Framework 4.0下。我已經正確下載並安裝了必要的客戶端密鑰/證書。我已將IP地址和服務器名稱添加到主機文件,並將其添加到代理旁路列表中。我可以瀏覽到端點並在IE和VS的Web瀏覽器中查看WSDL。我甚至可以在VS中查看WSDL的對話框中的對話框。在每種情況下,我都會提示選擇使用哪種證書,這是我的職責。

我無法訪問Web服務本身或其所在的服務器。

我在Google上花了很多時間,但一直沒有找到解決辦法。有任何想法嗎?

回答

5

通過下載WSDL,它拉成VS通過通過引用URL file:\\\drive:\pathname\filename.wsdl添加Web引用對話框工作圍繞這一問題。

相關問題