远程服务器返回错误:(407)需要代理身份验证。 [英] The remote server returned an error: (407) Proxy Authentication Required.

查看:706
本文介绍了远程服务器返回错误:(407)需要代理身份验证。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调用Web服务的应用程序上工作。实际上它是https网络服务。当我通过IE或其他浏览器调用Web服务的方法时,它完美无缺。我写了win表单应用程序来连接Web服务。结果我得到"远程服务器返回错误:(407)需要代理验证。"错误。所有呼叫我的环境都是通过代理进行的。 application.config文件中的几行解决了这个问题:

< system.net >
<
defaultProxy 启用 = " " useDefaultCredentials = " true " />< / system.net >

但我需要从"服务器"调用Web服务。我申请的一部分。服务器部分在IIS下运行。当我从我的"服务器"调用https Web服务时,错误返回。 winform的修复不起作用。

有任何建议吗?

<system.net>
<
defaultProxyenabled="true" useDefaultCredentials="true" /></system.net>

But I need to call to the web service from a "server" part of my application. The server part runs under IIS. And when I call to https web service from my "server", the error returns back. The fix for a winform does not work.

Any advice?

推荐答案

ASP.NET中的等效配置文件是 web.config 。将该信息放在您网站的web.config中,它将生效。请参阅 http://msdn.microsoft.com/en-us/library/ms178683.aspx etc(你可以把它放在全局的machine.config文件中,但这可能有点粗糙......)
The equivalent config file in ASP.NET is web.config .  Put that information in the web.config for your website and it will take effect.  See http://msdn.microsoft.com/en-us/library/ms178683.aspx etc  (You could instead put in in the global machine.config file, but that may be a bit crude...)


这篇关于远程服务器返回错误:(407)需要代理身份验证。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆