Thursday, January 08, 2009

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.

4 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.

Anonymous 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?

ASP.NET MVC - Sport Facility Booking system

  The project relies on some external service providers. Thus accessing them via their API requires authentication. An API Key need to be su...