<module> Element (Network Settings)

Adds a new proxy module to the application.

<configuration>
  <system.net>
    <defaultProxy>
      <module>

Syntax

<module
  type="type_fullname, assembly_fullname"
/>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
type The fully qualified type name (indicated by the FullName property) and the assembly name (indicated by the FullName property), separated by a comma, that implements the proxy.

Child Elements

None.

Parent Elements

Element Description
defaultProxy Configures the Hypertext Transfer Protocol (HTTP) proxy server.

Remarks

The module element registers proxy classes that implement the IWebProxy interface. After registering the proxy class, module can be used to request information through the supported proxy.

The value for the type attribute should be the class name of the module and the name of its corresponding Dynamic Link Library (DLL).

Configuration Files

This element can be used in the application configuration file or the machine configuration file (Machine.config).

Example

The following example registers a custom proxy class.

<configuration>  
  <system.net>  
    <defaultProxy>  
      <module  
        type="Test.CustomWebProxy, TestProxy, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b23a5c561934e385"  
      />  
    </defaultProxy>  
  </system.net>  
</configuration>  

See also