<module> Element (Network Settings)
Adds a new proxy module to the application.
<configuration> Element
<system.net> Element (Network Settings)
<defaultProxy> Element (Network Settings)
<module> Element (Network Settings)
<module
type = "name", System, Version="version number", Culture="culture", PublicKeyToken="token" "
/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute |
Description |
---|---|
type |
The name and specifics of the module that implements the proxy. |
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
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, the <module> can be used to request information through the supported proxy.
The value for the type attribute should be the name of a valid Dynamic Link Library (DLL) and the class name of the module.
Configuration Files
This element can be used in the application configuration file or the machine configuration file (Machine.config).
Example
The following code example registers a custom proxy class.
<configuration>
<system.net>
<defaultProxy>
<module
type = "Test.CustomWebProxy, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
</defaultProxy>
</system.net>
</configuration>