Click here to Skip to main content
15,443,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Please help us to resolve the issue.
We modified application to implement Pre-compile razor views in asp .net mvc 5 . After modification we are not able to release the App from Azure DevOps, getting errors
Please review the following specific error details
Error ASPCONFIG: 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.
Process 'msbuild.exe' exited with code '1'.
We are experienced this error only during releasing of the application on Azure DevOps .
It was also happed on my home computer , after deleting files from obj folder it works fine.
Azure DevOps - Release getting failed so we uploaded Published Source Code through FTP on Azure App Service.
Old web app link working but if we create new Virtual Directly, new website link is not working ,
throwing error
Parser Error Message: 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

What I have tried:

Pre-compiled-Razor-View-in-ASP-NET-MVC
Posted
Comments
F-ES Sitecore 9-Jun-20 8:00am    
Check your updates didn't add a new copy of web.config somewhere in your project tree. You should only have one in the root and one in the Views folder, and the one in Views should only have stuff related to views\razor etc
jasminn 11-Jun-20 16:16pm     CRLF
@F-ES Sitecore Thank you for your quick reply , In project we have “Web.Config” one in the root and one in the Views folder, still facing same error
F-ES Sitecore 12-Jun-20 6:19am    
Next thing to check is that the root folder where the main web.config is, is actually configured as a root web folder in IIS.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900