usesystemdefault is not working in web.config

I was using HttpClient behind a firewall, so I want to use my IE proxy for the HttpClient. But when I set

  <system.net>
    <defaultProxy enabled="true">
        <proxy autoDetect="true" usesystemdefault="true"></proxy>
    </defaultProxy>
    <settings>
    </settings>
  </system.net>

in my web.config, then use WebRequest.DefaultProxy to get the proxy, the proxy is still blank in both the ProxyAddress and the ScriptEngine.

Could anyone help me figure out why?


Source: .net

Leave a Reply