Could not find schema information for the element 'exceptionHandling'.

Topics: Building and extending application blocks, Enterprise Library Core, Exception Handling Application Block
Feb 5, 2008 at 8:10 PM
I am receiving the "Could not find schema information for the element 'exceptionHandling'" warning from wihtin my config files. Anyone having this issue. I cannot find a resolution on the web. I am attempting to use the Enterprise Library 3.1 Exceltion management blocks but cannot get past this waring in my config file (web or app gives same warning). I have a reference to these DLLs:

Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll

My config file looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"/>
</configSections>
<exceptionHandling>
<exceptionPolicies>
<add name="Global Policy">
<exceptionTypes>
<add name="Exception" type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="None">
<exceptionHandlers>
<add name="Application Message Handler" type="ExceptionManagementBlockExample.AppExceptionHandler, ExceptionManagementBlockExample"/>
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
</exceptionPolicies>
</exceptionHandling>
</configuration>

I am using Vista and VS 2005. What am i missing?

Thanks

Ron
Feb 6, 2008 at 12:01 PM
Hi Ron,

Do you get warnings or information messages? Is it when you open the file with the Xml editor?
If you do get information messages in the Xml editor, that's to be expected; there are no xsds for EntLib's configuration elements.

If you're getting build errors, then please provide the details.

Regards,
Fernando
Feb 6, 2008 at 2:44 PM
I am getting warnings within visual studio. See below. I can compile and runif i am getting warnings, then my custom handler will not work, correct?

Message 1 Could not find schema information for the element 'exceptionHandling'. C:\Development Projects\Web\Test\ExceptMgt\Web.config 14 6 C:\...\ExceptMgt\
Message 2 Could not find schema information for the element 'exceptionPolicies'. C:\Development Projects\Web\Test\ExceptMgt\Web.config 15 8 C:\...\ExceptMgt\
Etc.
Feb 6, 2008 at 7:25 PM
Apparently i can ignore the warnings so there is no issue. The app works correctly. Thanks for you help.
Feb 11, 2008 at 1:38 AM

I had the exact same problem. I noticed that all the warnings went away if I just closed my app.config in Visual Studio.
That is as close as I am going to get to "solving" the mystery.


timmyj wrote:
Apparently i can ignore the warnings so there is no issue. The app works correctly. Thanks for you help.