allowDefinition='MachineToApplication' error when publishing from VS2010 (but only after a previous

Posted by burnt_hand on Stack Overflow See other posts from Stack Overflow or by burnt_hand
Published on 2010-04-02T10:47:33Z Indexed on 2010/04/02 10:53 UTC
Read the original article Hit count: 333

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.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about web-deployment