It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

Error

"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

This is the error message caused when I developed the ASP.NET application my development server. After few analysis I found that web.config should be moved to root directory from the sub directory. If you all want to have a web.config in the sub-directory, then the only settings you can specify are authorization, appsettings etc., Another root cause for the problem may be you may have one duplicate web.config file in a subfolder.

Comments

goot said…
Thank you! That did it.
goot said…
Thank you! That did it.
goot said…
Thank you! That cleared it up right away.
Divyans said…
I have the web.config in my root directory and I am still getting the same error. However I do not have IIS on my local PC. Is the error because of that?

Popular posts from this blog

ASP.NET website "Cannot read configuration file due to insufficient permissions" in IIS 7 and Windows Server 2008

Error occurred in deployment step 'Install app for SharePoint': The System Account cannot perform this action.

None of the selected features can be installed or upgraded. Setup cannot proceed since no