0

I've got a Visual Studio 2010 MVC 3 Project that I'm trying to deploy using the Web Deploy Publish option from within Visual Studio. Whenever I try to deploy I get the following error:

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.

When I google the above error I find that people say to either configure the virtual directory as an application, or to check for nested web.config files.

The site runs fine when I deploy the project to it manually, so I believe the site is configured properly. I don't have an application below the site tho, as the site itself is set up as the application.

Also while MVC projects do have nested web.config files (one in the root and one in the views folder) renaming the views web.config file didn't fix the error.

4

1 回答 1

1

Have you tried deleting your complied code in the obj folder and re-compiling?

于 2011-10-06T12:52:08.480 回答