Microsoft KB Archive/911719

= No exceptions of the ConfigurationException type are thrown when you run a .NET Framework 2.0-based application =

Article ID: 911719

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft ASP.NET 2.0

-



SYMPTOMS
When you run a Microsoft .NET Framework 2.0-based application, you may notice that no exceptions of the ConfigurationException type are thrown. This behavior occurs even if the .config file is missing or if the .config file contains configuration settings that are not valid.

Typically, this behavior occurs if the following conditions are true:
 * An assembly is executed by using the AppDomain object.
 * The AppDomain object is created by using the AppDomainSetup object.
 * The ConfigurationFile property for the AppDomainSetup object uses a URL that disallows anonymous access to the executed assembly.



CAUSE
This behavior occurs because the configuration system in the .NET Framework 2.0 ignores errors when the configuration system loads .config files over the network. This behavior prevents a malicious user from acquiring detailed information in exceptions.



STATUS
This behavior is by design.



MORE INFORMATION
For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

The AppDomain class

http://msdn2.microsoft.com/en-us/library/system.appdomain.aspx

The AppDomainSetup class

http://msdn2.microsoft.com/en-us/library/system.appdomainsetup.aspx

The AppDomainSetup.ConfigurationFile property

http://msdn2.microsoft.com/en-us/library/system.appdomainsetup.configurationfile.aspx

The ConfigurationSettings.AppSettings property

http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsettings.appsettings.aspx

Keywords: kbprogramming kbinfo kbtshoot kbprb KB911719

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.