AllowDefinition = 'MachineToApplication' - MVC3 ERROR

I am developing an application in MVC3 ( http://www.colombiatrolley.com/sitrolley ). It works correctly on my computer, but when I upload it to the server (hosting service), I get this error:

Parser error message: The error in using a partition registered as allowDefinition = 'MachineToApplication' exceeds the application level. This error can be caused by the fact that the virtual directory is not configured as an application in IIS.

I know this is a very common mistake, but I have not fixed it yet.

Error capture

+6
source share
2 answers

Some configuration sections are only allowed in the "root" of the application, and then authentication is one of them.

You need to configure IIS to run your site as an application, not a subdirectory in an existing application.

For IIS 7+, right-click the directory containing your web application and select Convert To Application.

EDIT

Ari van Someren is right. Having carefully studied your error, you want the <authentication> configuration to be up one level in web.config, and not in web.config in the views.

+3
source

I had the same problem. I solved this by deleting the obj folder that appeared after creating Build> Publish.

+1
source

Source: https://habr.com/ru/post/909705/


All Articles