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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, that enabled me to see the actual error. I'm still not able to deploy, but at least now I feel I'm getting closer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.