简体   繁体   English

WebRequest.GetSystemWebProxy()不包括uri

[英]WebRequest.GetSystemWebProxy() doesn't include uri

I'm trying to get the system proxy: 我正在尝试获取系统代理:

var proxy = WebRequest.GetSystemWebProxy();

However, the proxy object returned has its Address property always null . 但是,返回的代理对象的Address属性始终为null

The proxy is set in the Internet Options window. 代理在“ Internet选项”窗口中设置。

Internet选项代理设置:127.0.0.1:8888

In msdn, it shows "GetSystemWebProxy method reads the current user's Internet Explorer (IE) proxy settings.". 在msdn中,它显示“GetSystemWebProxy方法读取当前用户的Internet Explorer(IE)代理设置。”。

So if you are developing a web app and deployed it to IIS, please check the identity of the app pool is same as the current user, which you have set the proxy. 因此,如果您正在开发Web应用程序并将其部署到IIS,请检查应用程序池的标识是否与您设置代理的当前用户相同。 And make sure the IE proxy has been checked. 并确保已检查IE代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM