Error: allowDefinition='MachineToApplication' beyond application level Error: allowDefinition='MachineToApplication' beyond application level asp.net asp.net

Error: allowDefinition='MachineToApplication' beyond application level


I've just encountered this "delight". It seems to present itself just after I've published a web application in release mode.

The only way to consistently get round the issue that I've found is to follow this checklist:

  1. Clean solution whilst your solution is configured in Release mode.
  2. Clean solution whilst your solution is configured in Debug mode.
  3. Build whilst your solution is configured in Debug mode.


Just come across this post and that was happening to me.
Just Clean the project and the error goes away. (must be a VS2010 bug)


I have just had this problem when building a second version of my website. It didn't happen when I built it the first time.

I have just deleted the bin and obj folders, run a Clean Solution and built it again, this time without any problem.