Questions tagged «http-status-code-407»

7
远程服务器返回错误:(407)要求代理身份验证
调用Web服务时出现此错误: “远程服务器返回了一个错误:(407)需要代理身份验证”。 我有了一般的想法,我可以通过添加代码来使代码工作 myProxy.Credentials = NetworkCredential("user", "password", "domain"); 或在代码中使用DefaultCredentials。我的问题是,没有此功能,对Web服务的调用即可在生产环境中工作。 似乎有一个涉及Machine.config的非代码解决方案,但这是什么?目前,我无法进入生产包装盒的machine.config文件来查看其外观。我尝试按照以下方式更新我的machine.config,但仍然收到407错误。 <system.net> <defaultProxy enabled="true" useDefaultCredentials="true"> <bypasslist> <clear /> </bypasslist> <proxy proxyaddress="myproxy:9000" usesystemdefault="false" bypassonlocal="true" autoDetect="False" /> </defaultProxy> </system.net>
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.