Microsoft Knowledge Base Email Alertz

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

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]






Microsoft Knowledge Base Article

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

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

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:911719
Last Review:February 23, 2007
Revision:1.1

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.

Back to the top

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.

Back to the top

STATUS

This behavior is by design.

Back to the top

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 (http://msdn2.microsoft.com/en-us/library/system.appdomain.aspx)

The AppDomainSetup class
http://msdn2.microsoft.com/en-us/library/system.appdomainsetup.aspx (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 (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 (http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsettings.appsettings.aspx)

Back to the top


APPLIES TO
•Microsoft ASP.NET 2.0

Back to the top

Keywords: 
kbprogramming kbinfo kbtshoot kbprb KB911719

Back to the top

   

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please