问题描述
背景:我的任务是创建一个单点登录解决方案,该解决方案会将我们的内部用户重定向到供应商的Web应用程序.我将其设置为ASP.Net项目,该项目将调用供应商提供的Web服务.该服务将返回一个URL和一个令牌,用于登录供应商的站点.所有这一切都必须安全完成.
Background: I've been tasked with creating a single sign on solution which will redirect our internal users to a vendor's web application. I've set it up as an ASP.Net project which will call a web service provided by the vendor. This service will return a URL and a token to be used to sign in to the vendor's site. All this is to be done securely.
问题:使用Visual Studio的 添加Web引用 对话框下载WSDL并生成所需的代理类时,出现以下错误:
Problem: When using Visual Studio's Add Web Reference dialog to download the WSDL and generate the required proxy class, I get the following error:
除此错误外, 添加引用 按钮显示为灰色,这使我无法添加引用并生成代理类.
In addition to this error, the Add Reference button is grayed out, preventing me from adding the reference and generating the proxy class.
该项目在.Net Framework 4.0下运行.我已经正确下载并安装了必要的客户端密钥/证书.我已将IP地址和服务器名称添加到hosts文件,并将两者都添加到代理绕过列表.我可以浏览到端点并在IE和VS的Web浏览器中查看WSDL.我什至可以在VS的 添加Web参考 对话框中查看WSDL.在每种情况下,系统都会提示我选择要使用的证书.
The project is running under .Net Framework 4.0. I've downloaded and installed the necessary client keys/certificates correctly. I've added the IP address and server name to the hosts file and added both to the proxy bypass list. I can browse to the endpoint and view the WSDL in IE and VS's web browser. I can even view the WSDL in the Add Web Reference dialog box in VS. In each case, I'm prompted to select which certificate to use, which I do.
我无权访问Web服务本身或Web服务所在的服务器.
I do not have access to the web service itself or the server it is located on.
我已经在Google上花费了很多时间,但是找不到解决方法.有什么想法吗?
I've spent many hours on Google, but have not been able to find a resolution. Any ideas?
推荐答案
通过下载WSDL并通过 添加Web参考 对话框将其拉入VS来解决此问题.通过引用URL file:\\\drive:\pathname\filename.wsdl
.
Worked around the issue by downloading the WSDL and pulling it into VS through the Add Web Reference dialog by referencing the URL file:\\\drive:\pathname\filename.wsdl
.
这篇关于无法在VS.Net 2010中添加安全的Web参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!