User-1292195402 posted
I currently have 2 MVC websites, both built originally as ASP.NET forms applications in Visual Studio 2013 with .NET framework version 4.5. They were later migrated to an MVC platform in Visual Studio 2013, without changing the framework version. We are
currently trying to upgrade both projects to the latest version of .NET (4.6) and switch to Visual Studio 2017 for development, testing, and deployment of both applications.
The conversion of the projects to VS2017 encountered one issue which seems rooted in a fundamental change to the ASP.NET MVC framework that was implemented with the release of VS2017. The problem manifested itself in one of our applications which uses 2
separate MVC Areas in its routing scheme. We do not, for the most part, use the auto-generated folders for Controllers, Models, and Views that are created with a new MVC project template. Rather, there is a folder for 'Areas' with 2 subfolders. These are a
standard 'Home' area/folder, with its main folder and subfolders for Controllers, Models, and Views which are accessed by the routing engine.
We also have an 'Applications' area/folder (applications refers to applying to be part of our organization, not web applications). This has the same sub-structure as the 'Home' folder with Controllers, Models, and Views separated into sub-folders. In the
current working version of our code, either area can be accessed using a parameter indicating the correct area (e.g. '….{new Area="Applications"}
' or the method, controller, and area (e.g. href="@Url.Action("Index", "Teacher",
new { area = "Applications" })")
.
While the 'Home' area runs as expected in the new VS2017 environment, it seems that the new routing engine is unable to recognize and locate the controllers and views in the 'Applications' area. It returns a 404 error for all methods / views in the 'Applications'
area. Any pointers as to what changed need to be done to make the original project compatible with VS-2017, as I am getting a 404 error when trying to access views from the second 'area' in the project when running it.