Can you run Framework 4.7.2 on IIS server with apps running .NET 7.0

Joseph Kashishian 20 Reputation points
2023-09-12T14:46:04.0033333+00:00

We are building new IIS server and wanted to find out if we can have Framework 4.7.2 and running with apps running .NET 7. will cause any issues

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
708 questions
Internet Information Services
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,482 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
522 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 58,441 Reputation points
    2023-09-12T17:37:13.19+00:00

    note: while the apps may be built with 4.7.2, the IIS server have the latest 4.8 runtime update.

    0 comments No comments

  2. Yurong Dai-MSFT 2,806 Reputation points Microsoft Vendor
    2023-09-13T08:18:15.6066667+00:00

    Hi @Joseph Kashishian,

    .NET Framework and .NET runtime are designed to be side-by-side compatible, which means that multiple versions of the .NET runtime can be installed on the same machine without interfering with each other or with applications built on other versions. Internet Information Services supports hosting multiple versions of the .NET runtime side by side.

    You simply create separate application pools in IIS for your applications and assign the appropriate .NET runtime version to each application pool. When you configure your web applications in IIS, assign each application to its own application pool.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,

    Yurong Dai


  3. Lex Li (Microsoft) 4,742 Reputation points Microsoft Employee
    2023-09-13T17:28:37.6566667+00:00

    What you might do on a new server are,

    1. To keep ASP.NET 4.x web apps isolated from ASP.NET Core web apps.
    2. Create individual application pools and determine clearly which of them should host ASP.NET 4.x apps and which for ASP.NET Core ones.
    3. Disable ASP.NET 4.x runtime in ASP.NET Core only application pools.

    Then like the other answers indicated, you might find such apps run fine and that's the side-by-side execution designed by Microsoft.

    If you don't have any ASP.NET 4.x to run on this server, just .NET 7 web apps, then no wonder things go even simpler.

    However, if later your server setup slightly goes beyond the above, like

    • Mixing ASP.NET 4.x and ASP.NET Core web apps under the same site.
    • Putting such apps under the same application pools.

    then issues are expected and you need further tuning of the settings. Since those issues have been well known since ASP.NET Core 1.0 (released several years ago), you should be able to find tons of previous discussions and well tested solutions/workarounds.

    0 comments No comments