Why do I randomly get a "error to use section registered as allowDefinition='MachineToApplication'"

Posted by Jedidja on Stack Overflow See other posts from Stack Overflow or by Jedidja
Published on 2010-01-27T13:36:40Z Indexed on 2010/04/10 11:33 UTC
Read the original article Hit count: 362

Filed under:
|

I have seen a few questions on SO about a similar error when deploying a website, but I seem to randomly get this error when building an ASP.NET MVC website in Visual Studio. Performing a clean usually fixes it, but is there any way to avoid this completely?

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. d:...\obj\debug\package\packagetmp\web.config

Note that it is complaining about the root web.config, not the one from the Views subdirectory.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about web-config