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. SpringBoot(九) ElasticSearch 全文检索

    ElasticSearch ​ ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用 ...

  2. CentOS 安装 PHP 扩展

    下载地址:https://pecl.php.net/package/redis 上传目录:/usr/local/src //安装依赖 yum install php-devel -y //进入安装包目 ...

  3. dos命令,jdk&jre&jvm的关系,classpath和path区别

    Day01_SHJavaTraing_4-2-2017 一.学习方法 1.独立思考 2.独立整理.总结知识点 3.整理Exception报错文档 4.莫钻牛角尖 5.敲代码,敲,猛敲,死里敲 6.写代 ...

  4. Qwiklab'实验-CloudFront, EFS, S3'

    title: AWS之Qwiklab subtitle: 3. Qwiklab'实验-CloudFront, EFS, S3' date: 2018-09-21 17:29:20 --- Introd ...

  5. 面试题sql

    查询书的价格10到20 之前显示10to20 没有显示unknown CREATE TABLE book(price INT,NAME VARCHAR(20)) SELECT NAME AS '名字' ...

  6. 使用短信猫读取短信java代码

    短信猫简单配置:https://www.cnblogs.com/Big-Boss/p/9699880.html 测试发送短信代码:https://www.cnblogs.com/Big-Boss/p/ ...

  7. Java 实现简单的RPC框架

    0 引言 RPC,全称为Remote Procedure Call,即远程过程调用,它是一个计算机通信协议.它允许像调用本地服务一样调用远程服务.它可以有不同的实现方式.如RMI(远程方法调用).He ...

  8. 1、Attention_based Group recommendation——基于注意力机制的群组推荐

    1.摘要: 本文将Attention-based模型和BPR模型结合对给定的群组进行推荐项目列表. 2.算法思想: 如图: attention-based model:[以下仅计算一个群组的偏好,多个 ...

  9. 【XSY3306】alpha - 线段树+分治NTT

    题目来源:noi2019模拟测试赛(一) 题意: 题解: 这场三道神仙概率期望题……orzzzy 这题暴力$O(n^2)$有30分,但貌似比正解更难想……(其实正解挺好想的) 注意到一次操作实际上就是 ...

  10. Java web课程学习之Request和Response

    request和response l HttpServletRequest l 请求转发 l HttpServletResponse l 请求重定向   请求流程 每次请求service(),都会由容 ...