Application will not read the changes made to app.config or machine.config at runtime

Change the app.config or machine.config when the application that uses them is running.


Result

The application will not be able to read these changes, and the new changes made to the .config files will not be reflected in the application.


Cause

.NET Framework will read the .config file once at application startup and then not read them again during that session.


Resolution

Restart the application so it can read these changes.


More Information

App.Config reloading (http://blogs.msdn.com/junfeng/archive/2005/02/20/376880.aspx)
Machine.Configuration Files (http://msdn2.microsoft.com/en-us/library/ms229697.aspx)


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.



APPLIES TO
Microsoft Visual Studio 2005 Express Edition
Microsoft Visual Studio 2005 Professional Edition
Microsoft Visual Studio 2005 Standard Edition
Microsoft Visual Studio 2005 Team Suite
Microsoft Visual Studio 2008 Academic Edition
Microsoft Visual Studio 2008 Professional Edition
Microsoft Visual Studio 2008 Standard Edition
Microsoft Visual Studio Team System 2008 Team Suite

——————————————–

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image