webforms - ASP.NET 4.5 Web.config Error -



webforms - ASP.NET 4.5 Web.config Error -

my web.config file structured follows:

<?xml version="1.0" encoding="utf-8"?> <configuration> ... </configuration>

the above works.

when seek add together appsettings section follows:

<?xml version="1.0" encoding="utf-8"?> <configuration> <appsettings> </appsettings> ... </configuration>

i next error:

http error 500.19 - internal server error requested page cannot accessed because related configuration info page invalid.

error code 0x8007000d config error 1 element allowed. must first kid element of root element

update

if place <appsettings></appsettings> section after <configsections></configsections> section, works! what's happening?

your error message "config error 1 element allowed. must first kid element of root element" referring <configsections> element.

per msdn:

if configsections element in configuration file, configsections element must first kid element of configuration element.

so, <appsettings> element work when follows <configsections>, design.

asp.net webforms web-config

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -