You are currently offline, waiting for your internet to reconnect

How to override .NET connectionManagement settings in an application configuration file

Source: Microsoft Support
RAPID PUBLISHING
RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
Symptom
When attempting to add a custom connectionManagement entry in an application configuration file (dllhost.exe.config, for example), the following error message may be thrown if a duplicate address already exists in the connectionManagement section of the machine.config file: 

    System.Configuration.ConfigurationException: The entry '*' has already been added

Note This example assumes the wildcard address is being set in both the application configuration and machine.config file.
Cause
Resolution
More Information
Duplicate 'add' entries cannot exist in an application configuration file and the machine.config file, as the 2.0 framework does not treat this as an override.

To work around this error, the duplicate entry must first be removed in the application configuration file, and then added. For example, if you have the following entry in machine.config file:

<system.net>
<connectionManagement>
<add address="*" maxconnection="48"/>
</connectionManagement>
</system.net>

and then attempt to create a dllhost.exe.config file with this:

<system.net>
<connectionManagement>
<add address="*" maxconnection="12"/>
</connectionManagement>
</system.net>

the error will occur when the application hosted in the dllhost process spins up. To fix this, add a remove entry for the wildcard address just above the add entry within the application configuration file, as shown here:

<system.net>
<connectionManagement>
<remove address="*">
<add address="*" maxconnection="12"/>
</connectionManagement>
</system.net>
DISCLAIMER
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Properties

Article ID: 969189 - Last Review: 03/18/2009 13:03:16 - Revision: 1.0

Microsoft .NET Framework 2.0

  • kbrapidpub kbnomt KB969189
Feedback