Why do I randomly get a "error to use section registered as allowDefinition='MachineToApplication'"
- by Jedidja
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.