Reputation: 558
I'm having this issue when i publish my MVC 4 project to the web server which is Windows Server 2012. I've tried to clean/rebuild but still doesn't make any change!
Any idea would be helpful!
Thanks in advance!
Upvotes: 0
Views: 930
Reputation: 601
"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."
As it says, the Virtual Directory is not being configured as an ASP.NET application. You may have to go to IIS admin console, go to directory properties and do a "Create Application". To do so :
-Open the IIS Administration Console on the server where the application is published
-Right click on the Virtual Directory where the application files are published
-Select Properties, then a "Main Properties" dialog pops up.
-There is a "Application Settings" section. Just hit "Create" in front of the "Application Name" textbox, then hit "Ok"
-Check that the Virtual Directory appears with a different icon, it should be ok now.
Upvotes: 1