简体   繁体   中英

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 .

The proxy is set in the Internet Options window.

Internet选项代理设置:127.0.0.1:8888

In msdn, it shows "GetSystemWebProxy method reads the current user's Internet Explorer (IE) proxy settings.".

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. And make sure the IE proxy has been checked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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