1. Supply the credentials of the Currently Logged on User to the Proxy object similar to this:

// Begin code change by jeff

                    //  Obtain the 'Proxy' of the  Default browser.
IWebProxy theProxy = aReq.Proxy;
// Print the Proxy Url to the console.
if (theProxy != null)
{
// Use the default credentials of the logged on user.
theProxy.Credentials = CredentialCache.DefaultCredentials;
}
// End code change by jeff HttpWebResponse aResp = aReq.GetResponse() as HttpWebResponse;

  2. Add this property to the <<application>>.exe.config or machine.config file:

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

  link:http://blogs.msdn.com/b/jpsanders/archive/2009/03/24/httpwebrequest-webexcepton-the-remote-server-returned-an-error-407-proxy-authentication-required.aspx

HttpWebRequest WebExcepton: The remote server returned an error: (407) Proxy Authentication Required.的更多相关文章

  1. System.Net.WebException : The remote server returned an error: (415) UNSUPPORTED MEDIA TYPE

    I am having problems with a bit of code that accesses a restful web service. Running this code, it e ...

  2. Call Azure Queue get "The remote server returned an error: (400) Bad Request."

    这几天开始研究Windows Azure, 在使用Azure Queue 的时候,CreateInfNotExists 总是抛出异常 "The remote server returned ...

  3. WebService:The remote server returned an error: (400) Bad Request

    开发工具:VS2010.开发组件:WebService.运行环境:Windows 今天一个同事在进行计费接口联调试时,发现了一个非常奇怪的问题:接口在家里环境测试,一切正常,但是部署到现网环境之后,连 ...

  4. EWS code return Error : Request failed. The remote server returned an error: (403) Forbidden OR (401) Unauthorized

    Following is my code. ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1 ...

  5. request 报错The remote server returned an error: (415) Unsupported Media Type.

    开发时遇到个问题,程序访问数据库数据,给服务器发送请求时,老是报错,返回的错误页面是: HTTP Status 415 - Unsupported Media Type type Status rep ...

  6. WP8 调用webservice 错误 The remote server returned an error: NotFound 解决

    本人出错是由于本地的IIS不能被局域网其它机器访问导致的,如果你所用的本机IIS 也不可被其它机器访问,则可按照本文进行设置   具体操作时需要在防火墙设置中添加 入站规则   具体步骤如下: 1.控 ...

  7. unity 打包Error:WebException: The remote server returned an error: (403) Forbidden.

    記一下在ios上打包出錯: UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlaye ...

  8. CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

    今天,在用icinga服务器端测试客户端脚本时,报如下错误: [root@mysql-server1 etc]# /usr/local/icinga/libexec/check_nrpe -H 192 ...

  9. 邮件退信“Remote Server returned '420 4.2.0 Recipient deferred because there is no Mdb'”

    标题是一个近期遇到的NDR 对于Exchange运维工作者,NDR通常给了我们较为清晰的排错方向,我们先看一下退信的原因, 我的一台MailBox报错“远程服务器返回‘420 4.2.0’接受延迟,因 ...

随机推荐

  1. vue入门--简单嵌套路由的一个路径小问题

    假设现在有一个项目,刚进去要显示main页面下的contorl页面,那么路由里面的初级路由应该是{main和err},这两个是同一级,然后{control和set}是main下的子路由,foot是这两 ...

  2. JAVA实现两种方法反转单列表

    /** * @author luochengcheng * 定义一个单链表 */ class Node { //变量 private int record; //指向下一个对象 private Nod ...

  3. gdb usage

    list stack of all threads thread apply all bt

  4. shell编程-1.字符截取命令-列截取awk+printf

  5. SpringMVC(六)POJO类作为 @RequestMapping方法的参数

    Command or form objects to bind request parameters to bean properties (via setters) or directly to f ...

  6. hdu 1072 广搜(逃离爆炸迷宫)

    题意: 在n×m的地图上,0表示墙,1表示空地,2表示人,3表示目的地,4表示有定时炸弹重启器.定时炸弹的时间是6,人走一步所需要的时间是1.每次可以上.下.左.右移动一格.当人走到4时如果炸弹的时间 ...

  7. jsp错误页面的处理

    局部的错误处理 1,errorpage 在错误页面指令page中声明errorpage="要显示的页面地址" 在要显示的页面page中声明iserrorpage="tru ...

  8. jquery queryBuilder过滤插件的使用

    1.此插件用于过滤搜索的功能,功能强大,可实现复杂条件过滤,单选多选的等条件的过滤.还可以在插件中调用其他插件. 下载地址和文档阅读:http://querybuilder.js.org/ 效果图: ...

  9. 【XSY2689】王子 - 网络流

    复活!qwq 题目来源:2018冬令营模拟测试赛(九) 题意: [背景描述]     不是所有王子都会遇见自己的中关村,主公,公主. 从前有个王子姓王,王王子遇到了一位美丽的公主,她的名字当然是公公主 ...

  10. 论文阅读《ActiveStereoNet:End-to-End Self-Supervised Learning for Active Stereo Systems》

    本文出自谷歌与普林斯顿大学研究人员之手并发表于计算机视觉顶会ECCV2018.本文首次提出了应用于主动双目立体视觉的深度学习解决方案,并引入了一种新的重构误差,采用自监督的方法来解决缺少ground ...