<add> Element for <connectionManagement>

Adds an IP address or DNS name to the connection management list.

<configuration>
   <system.net>
      <connectionManagement>
         <add>

<add
   address = "address expression"
   maxconnection = integer
/>

Required Attributes

Attribute Description
address A regular expression describing an IP address or DNS name.

Optional Attributes

Attribute Description
maxconnection The maximum number of connections allowed to a server. If not supplied, the default is 2.

Remarks

The address attribute contains the IP address or DNS name of an Internet server, or an asterisk (*) to indicate the default number of connections to unspecified servers.

Example

The following example configures an application to use four connections to the server www.contoso.com and two connections to all other servers.

<configuration>
   <system.net>
      <connectionManagement>
         <add name = "www.contoso.com" maxconnection = "4" />
         <add name = "*" maxconnection = "2" />
      </connectionManagement>
   </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

<connectionManagement> Element | Network Settings Schema