代理身份验证必需的问题 [英] Proxy Authentication Required Issue

查看:84
本文介绍了代理身份验证必需的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的Web应用程序使用具有以下代码的Web服务.

System.Net.WebProxy objprox =新的System.Net.WebProxy("http://代理服务器名称:端口号");
objprox.Credentials =新的System.Net.NetworkCredential(用户名",密码",域名");

WebService1 objService =新的WebService1();
objService.Proxy = objprox;

但是我收到了异常消息请求失败,HTTP状态为407:需要代理身份验证".使用方法形式的webservice时.

有人可以对此提出建议.

Hi all,

My web application consumes a web service with the following code.

System.Net.WebProxy objprox = new System.Net.WebProxy("http://proxyservername:portnumber");
objprox.Credentials = new System.Net.NetworkCredential("username", "password", "domainname");

WebService1 objService = new WebService1();
objService.Proxy = objprox;

But I get the exception as "The request failed with HTTP status 407: Proxy Authentication Required." while using the method form webservice.

Can any one suggest for this.

推荐答案

您尝试 ^ ]?

我找到此答案 [
Did you try to Google for the error message [^]?

I e.g. found this answer[^], which basically looks like your code, too.

So maybe you are passing the wrong credentials to your proxy server?

Usually, activating detailed logging on the proxy server and inspecting the log file after your request to the web service should help to narrow down the issue.




你在做什么是正确的.您是在向服务器传递正确的凭据,还是在稍后的代码中更改代理的URL?如果确实有此修复程序,请务必发布该修复程序,以便对其他人有所帮助.

问候,
爽口.
Hi,

What you are doing is correct. Were you passing correct credentials to the server and also are you changing the URL of the proxy in your code at later stage? Please do post the fix in case you have got one, so that it would help others.

Regards,
Sushant.


这篇关于代理身份验证必需的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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