Setting default proxy in .NET Framework

Update web.config:


<configuration> 
  <system.net> 
    <defaultProxy useDefaultCredentials="true"> 
      <proxy 
        usesystemdefault="True" 
        proxyaddress="http://192.168.1.10:3128" 
        bypassonlocal="True" 
      /> 
    </defaultProxy> 
  </system.net> 
</configuration>

Detailed explanation can be found here: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/network/proxy-element-network-settings

Notice the following for "usesystemdefault": Specifies whether to use Internet Explorer proxy settings. If set to True, subsequent attributes will override Internet Explorer proxy settings. The default value is Unspecified

Post a Comment

Previous Post Next Post