Can I run my old .net 4.0 application on windows server 2016?

Vivek Dhuttekar 1 Reputation point
2021-07-19T14:29:12.83+00:00

Hi Team,
We are migrating from windows server 2008 R2 to Windows server 2016. Currently we have .Net application with .Net framework 4.0.

During this migration Can I directly use my old application with .Net 4.0 on windows server 2016? if yes, will it cause any security deviation? or it is mandatory to use applications with 4.6.2 + versions on windows server 2016 ?

Please update on the same asap

Thanks,
Vivek

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,364 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,117 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Castorix31 81,356 Reputation points
    2021-07-19T14:35:36.537+00:00

    From MSDN :

    Source code written for one version of .NET Framework should compile on later versions of .NET Framework, and binaries that run on one version of .NET Framework should behave identically on later versions of .NET Framework.

    Version compatibility
    (with details at Backward compatibility)

    0 comments No comments

  2. Lex Li (Microsoft) 4,662 Reputation points Microsoft Employee
    2021-07-20T01:15:08.727+00:00

    Windows Server 2016 only ships with .NET Framework 4.6.2 and above, so your app has no other option to choose from.

    Security is not a concern here as Windows update patches .NET Framework periodically. But as an in-place upgrade of .NET Framework 4.0, 4.6.2 and above do introduce breaking changes, so you should worry about compatibility issues.

    0 comments No comments

  3. Teemo Tang 11,331 Reputation points
    2021-07-20T01:54:19.013+00:00

    It's impossible for us to know whether a app will run in a specific .NET version without seeing the application itself…

    Please refer to this similar case:

    “I have made this move from Windows Server 2008 R2 to Windows Server 2016 and it did not need to upgrade any web application. They run just fine.
    Some issues that you may have are:
    As years pass by, you always make small changes on IIS, add some MIME types, change some permissions... change some ISAPI filters - stuff like that may show you some errors at first.
    New Permissions on the servers web site directory and on the databases.
    Maybe some extra ISAPI filter that is not run anymore on the new IIS”

    https://stackoverflow.com/questions/60424629/migrating-net-4-0-application-and-deploying-in-windows-server-2016

    -------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    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.

    0 comments No comments