Поделиться через


<defaultProxy> Element

Specifies the proxy server to use for HTTP requests to the Internet.

<configuration>
   <system.net>
      <defaultProxy>

<defaultProxy>
</defaultProxy>

Child Elements

Element Description
<proxy> Defines the proxy server.
<bypasslist> Lists regular expressions that describe addresses that do not use the proxy.
<module> Adds a new proxy module to the application.

Remarks

The <defaultProxy> element defines the proxy server information returned by the GlobalProxySelection class. Any HttpWebRequest that does not have its Proxy property set uses the proxy defined by defaultProxy.

Example

The following example configures an application to use the system default proxy.

<configuration>
   <system.net>
      <defaultProxy>
         <proxy
            usesystemdefault = "true"
         />
      </defaultProxy>
   </system.net>
</configuration>

Configuration File

This element can be used in the application configuration file, the machine configuration file (Machine.config), and the publisher policy file.

See Also

GlobalProxySelection | Network Settings Schema