尝试添加 Web 引用时出错

发布于 2024-10-07 06:59:25 字数 705 浏览 0 评论 0原文

我有一个链接 http://xxx.yyy.net/zzz/OpacAccess?wsdl在 IE 中打开并正确显示 Web 服务的方法。

但是,我有一个控制台应用程序,我试图在其中添加 Web 引用,但无法使其正常工作。我右键单击该项目,然后单击“添加服务引用...”,然后单击“高级...”,然后单击“添加 Web 引用...”。当我在此处输入 URL 时,它会正确显示方法,但我无法添加引用(按钮呈灰色)并显示以下错误:

下载“http://xxx.htm”时出错。 yyy.net/zzz/OpacAccess?wsdl'。无法连接到远程服务器。无法连接,因为目标机器主动拒绝127.0.0.1:80。

如果我使用 Visual Studio 命令行并执行以下命令, wsdl http://xxx.yyy.net/zzz/OpacAccess?wsdl ,我收到“处理 http://xxx.yyy.net/zzz/OpacAccess? 时出错? wsdl”,然后出现上述错误。

预先非常感谢您提供的任何帮助。

I have a link http://xxx.yyy.net/zzz/OpacAccess?wsdl that opens in IE and shows the methods of web service correctly.

However, I have a console application where I'm trying to add a web reference but I'm not able to get it working. I right-click the project and click "Add service reference..." From here, I click "Advanced..." and from there I click "Add Web Reference...". When I enter the URL here, it shows me the methods correctly, but I'm unable to add the reference (the button is greyed-out) and the following error is shown:

There was an error downloading 'http://xxx.yyy.net/zzz/OpacAccess?wsdl'. Unable to connect to the remote server. No connection could be made because the target machine actively refused it 127.0.0.1:80.

If I use the visual studio command-line with the following command,
wsdl http://xxx.yyy.net/zzz/OpacAccess?wsdl
, I get "There was an error processing http://xxx.yyy.net/zzz/OpacAccess?wsdl", followed by the above errors.

Thanks very much in advance for any assistance you could provide.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦魇绽荼蘼 2024-10-14 06:59:25

一般来说,当您可以通过浏览器访问某些内容,但不能通过您认为应该像浏览器一样工作的另一个程序访问某些内容时,那么问题就在于另一个程序的行为实际上并不像浏览器那样。

最常见的原因是代理设置。浏览器通常会设置它们(可能通过组策略或等效方法自动设置),而您的其他程序则不会。

In general, when you can access something through the browser, but not through another program you believe should work like the browser, then the problem is that the other program is not, in fact, behaving like the browser does.

The most common reason for this is proxy settings. The browser will usually have them set (perhaps automatically through Group Policy or the equivalent), and your other program will not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文