End of support for MVC 4 and Below

Sivakumar 1 Reputation point
2021-09-16T16:36:04.633+00:00

We have many applications developed with ASP.NET MVC 4 and below versions. As per the Microsoft Support Policy, the retirement date for ASP.NET MVC is July 1st, 2019. Does it mean that there won't be any support for ASP.NET MVC 4 and below versions?

What's the migration strategy for these below applcaitions(ASP.NET MVC 4 and below) to get support in future?

Thanks,
Siva

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,240 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 47,626 Reputation points
    2021-09-16T19:28:05.253+00:00

    These older versions are no longer being updated or maintained. Any issues you may run across will not be resolved. The only thing that MS may remotely do is fix a severe security hole if one is found but since the bulk of the functionality is provided by the core library they would simply fix it as part of the framework update.

    The migration path from MVC 4 is to MVC 5 and from Web API to Web API 2. Depending upon your application this may just involve updating some references, fixing compiler errors and recompiling your code but could go so far as to requiring you to rewrite or replace whole parts of your code. It really depends upon what you're doing. In my experience the upgrade isn't that bad.

    The official migration process is documented here.

    Note that MVC 5/Web API 2 is actually in support mode as well. While no future development will occur on it (or .NET Framework) there will still be security fixes as needed. All effort is now on .NET 5/6. Unfortunately this is a big upgrade and in most cases the recommendation is to rewrite your ASP.NET front end instead as there are simply too many differences. Short term you could upgrade to MVC 5 as it isn't going away anytime soon. Long term you need to come up with a migration plan to move to .NET 5/6 which is not compatible with MVC 5.


  2. Lan Huang-MSFT 25,386 Reputation points Microsoft Vendor
    2021-09-17T06:23:09.267+00:00

    Hi @Sivakumar ,
    Maybe you can migrate to the new version:
    Upgrade steps

    1. Back up your project.
    2. To upgrade from Web API to Web API 2, please change in global.asax:
    3. Make sure that all packages used by your project are compatible with MVC 5 and Web API 2
    4. Open the project to manage NuGet packages
      Update the application web.config file
      Update the web.config file in the Views folder
      The final step: build and test the application.

    For specific steps, you can refer to the following article:
    https://learn.microsoft.com/en-us/aspnet/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.
    Best regards,
    Lan Huang