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
Post a Comment