ASP.Net Does NOT accept <appsettings> tag


I am new to ASP.NET. I added following code to solve Validation Controls problem:

       <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms">  

But creating new bugs with adding this. Getting Error "HTTP Error 500.19" with this information:

The requested page cannot be accessed because the related configuration data for the page is invalid. The configuration section 'appsettings' cannot be read because it is missing a section declaration. Error Code: 0x80070032

My web.config content is simply this:

<?xml version="1.0"?>

For more information on how to configure your ASP.NET application, please visit

     <compilation debug="true" targetFramework="4.5" />
   <httpRuntime targetFramework="4.5" />


       <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms">  


I searched the web and didn't find a specific solution for this issue. And as I saw in related articles such errors may have many reasons. I don't know which one causing mine.
asked on Stack Overflow Oct 3, 2013 by user2808671

2 Answers


XML is case sensitive. You are looking for <appSettings>, not <appsettings>:

    <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />

You can make the add element self-closing, but that is just a little nice syntactic sugar that isn't required.

More documentation about the appSettings element can be found on MSDN.

answered on Stack Overflow Oct 3, 2013 by vcsjones

Your add tag should be self-terminating, but as vcsjones points out, your issue is likely case sensitivity of <appSettings> (not <appsettings>)

       <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms"/>  
answered on Stack Overflow Oct 3, 2013 by Nick Orlando • edited Oct 3, 2013 by Nick Orlando

User contributions licensed under CC BY-SA 3.0