Additional sections in ASP.NET web.config file error
-
09-12-2019 - |
Question
I have legacy ASP.NET web site, upgraded from ASP.NET 2.0 to ASP.NET 4.0 target framework. It's a pity, but the old web.config file uses too many custom sections, positioned on the same level as appSettings.
Web site compiles with error "Unrecognized configuration section MyCustomSection"
. Is it possible not to refactor all the code and keep the custom config sections in the web.config file?
Solution
Have you added the MyCustomSection to the configsections?
<configSections>
<section name="MyCustomSection"... />
</configSections>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow