I get the following error when I try to compile an asp.net site using a custom build script.
error ASPCONFIG: It is an error to use a section registered as a
In IIS, go to the folder that the app runs under, right click it, go to properties. On the Directory tab, look for "Application settings". Click the create button.
The rogue web.config file in the obj folder is most likely to be caused when you do a Publish Web Site. So just clean it up after you've done the publish.
if this happens after the virtual-directory is already created do the following:
I had this SAME EXACT problem and finally discovered a rogue Web.config was placed in my obj folder ... do yourself a favor and do a search in all the sub-directories for a web.config file. I deleted it and all was back to normal.
It is likely that your web.config file is placed in a directory that is not the root of the application. On most versions of IIS, you can convert any folder on your web site to an application root:
If this does not fix your problem, there may be another configuration error, either with IIS or your application.