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. 洛谷P4012 深海机器人问题(费用流)

    题目描述 深海资源考察探险队的潜艇将到达深海的海底进行科学考察. 潜艇内有多个深海机器人.潜艇到达深海海底后,深海机器人将离开潜艇向预定目标移动. 深海机器人在移动中还必须沿途采集海底生物标本.沿途生 ...

  2. .NET XML POST 请求

    //请求体,XML参数 string xmlstring = @"<root></root>“; //请求URL string postUrl ="http ...

  3. Python学习——BeautifulSoup篇

    BeautifulSoup     Beautiful Soup 是一个可以从HTML或XML文件中提取数据的Python库.它能够通过你喜欢的转换器实现惯用的文档导航,查找,修改文档的方式.Beau ...

  4. JAVA在线观看视频教程完整版

    今天给大家介绍一下JAVA在线观看视频教程完整版,我们知道Java是一种可以撰写跨平台应用软件的面向对象的程序设计语言,是由Sun Microsystems公司于1995年5月推出的Java程序设计语 ...

  5. UNP学习笔记1——基本TCP套接字编程

    1 套接字地址结构 大多数套接字函数都需要一个指向套接字地址结构的指针作为参数.每个协议族都定义了自己的套接字结构.这些套接字的结构以sockaddr_开头,以每个协议族唯一的后缀名结尾. 1.1 I ...

  6. Unity 向量点乘、叉乘

    向量点乘计算角度,向量叉乘计算方位 a,b为向量 点乘计算公式:a x b = |a| x |b| x cosθ 叉乘计算公式:a x b = |a| x |b| x sinθ

  7. Airtest ——poco

    1.  Pymysql(No module named ‘cryptography’) pip install cryptography pip install paramiko 把 cryptogr ...

  8. v-model指令后面跟的参数(number、lazy、debounce)

    1. number 想将用户的输入自动转换为Number类型(如果原值的转换结果为NaN, 则返回原值) 2. lazy 在默认情况下, v-model在input事件中同步输入框的值和数据, 我们可 ...

  9. LeetCode 856 递归思路详解

    题目描述 给定一个平衡括号字符串 S,按下述规则计算该字符串的分数: () 得 1 分. AB 得 A + B 分,其中 A 和 B 是平衡括号字符串. (A) 得 2 * A 分,其中 A 是平衡括 ...

  10. 安装Nginx的各种报错的解决

    如题,本人环境Ubuntu14.0虚拟机,安装一个nginx服务器来运行我的fastDfs文件管理的.但是安装出现了各种问题: sudo ./configure --prefix=/usr/local ...