如何通过代理/防火墙添加网络引用?

发布于 2024-07-05 08:10:16 字数 248 浏览 7 评论 0原文

我目前在工作中处于防火墙后面,正在测试已部署到​​我的网站的某些内容,而工作代理似乎在某种程度上阻止了它。

基本上我收到的消息是:

由于对象的当前状态,操作无效

我已将其归结为代理干扰,但我看不到任何高级设置或可以设置的任何内容以通过代理访问我的服务。

我快速谷歌了一下,但没有什么乐趣。

有人找到了快速解决这个问题的方法吗?

I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat.

Basically I am getting a message of:

Operation is not valid due to the current state of the object

I've got it down to my proxy interferring, but I can't see any advanced settings or anything I can set up to go through my proxy to get to my service.

I did a quick google for it, but no joy.

Anyone found a quick way to get around it?

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

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

发布评论

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

评论(2

爱本泡沫多脆弱 2024-07-12 08:10:16

编辑,我忘记在答案中写这部分:您可能需要将网络引用网址添加到代理的安全列表中。 我不确定您使用的是什么代理或者您是否可以控制它,但这应该可以解决您的问题。 如果您无权更改代理,那么我在下面进行了快速解决。

这里有一个快速解决方法,只需使用浏览器导航到 WSDL。 获取 xml 并将其作为 .wsdl 文件保存在您想要生成客户端的计算机上。 然后使用 wsdl.exe 生成客户端,将其指向您保存 wsdl 文件的路径。

Edit, I forgot to write this part in the answer: You may need to add the web reference url to the safe list for your proxy. I am not sure what proxy you are using or if you have control of it, but this should solve your problem. If you don't have access to change the proxy, then I put a quick work around right below.

Here's a quick work around, just use the browser to navigate to the WSDL. Grab the xml and save it as a .wsdl file on your computer you would like to generate the client on. Then use the wsdl.exe to generate the client pointing it to the path you saved the wsdl file.

魂归处 2024-07-12 08:10:16

另一种选择是转到应用程序的 Web 配置或应用程序配置,并在元素下添加以下内容:

<system.net> 
    <defaultProxy useDefaultCredentials="false">
       <proxy usesystemdefault="true" proxyaddress="10.0.0.1" port="80" bypassonlocal="true" />
    </defaultProxy>
</system.net>

然后,您可以以正常方式添加 Web 引用。

Another option is to go to your application's web config or app config and add the following under the element:

<system.net> 
    <defaultProxy useDefaultCredentials="false">
       <proxy usesystemdefault="true" proxyaddress="10.0.0.1" port="80" bypassonlocal="true" />
    </defaultProxy>
</system.net>

You can then add the web reference in the normal way.

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