allowDefinition='MachineToApplication' error when publishing from VS2010 (but only after a previous
- by burnt_hand
I can run my Asp.Net MVC 2 application without an issue on my local computer. Just Run / Debug.
But if I have already built it, I can't publish it! I have to clean the solution and publish it again. I know this is not system critical, but it's really annoying. "One Click Publish" is not "Clean solution and then One click publish"
The exact error is as follows:
  Error 11  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.
I suspect it's something to do with the Web.Config in the Views folder, but then why only after I build once previously. And just to note, the app works fine once published.