0

I have an aspnet web application that I recently upgraded to dotnet framework v4.8. I changed the project's dotnet version to 4.8. And I have made two changes to the web.config:

<httpRuntime maxRequestLength="2147483647" maxUrlLength="2097151" executionTimeout="1600" requestLengthDiskThreshold="2147483647" targetFramework="4.8" />
and
<compilation debug="true" batch="false" targetFramework="4.8" optimizeCompilations="true">

I would like to know how a web server determines which version of dotnet to run under? We have like 20 websites that we deploy the same app to. We don't deploy the web.config file, as it is different on each site. Will I have to update the web.config on each web server? Or will it know to use the version it was compiled under?

I am not referring to the app pool settings, which let you choose between the major version of dotnet, 4.0 or 2.0. I would like to know how to tell if it is using dotnet v4.6 or v4.8.

Mike H
  • 31
  • 6
  • It uses the Application Pool settings. – Dai Nov 11 '21 at 01:15
  • 1
    Does this answer your question? [Which version of the .NET Framework is IIS using for my AppPool?](https://stackoverflow.com/questions/37952860/which-version-of-the-net-framework-is-iis-using-for-my-apppool) – Dai Nov 11 '21 at 01:18
  • The Application Pool settings only let you choose between major versions of dotnet. The only choices for App Pool are 4.0 or 2.0. I would like to know whether it will use dotnet v4.8 as it was compiled, or v4.6 as specified in the web.config? – Mike H Nov 11 '21 at 17:47
  • 1
    You cannot select a minor release of .NET Framework. If your web.config uses .NET 4.8 but the machine only has 4.7.2 installed then you’ll get an error during startup. If your web.config specifies an older version than is installed (e.g. 4.7 or 4.5 on a 4.8 machine) then 4.8 will be used but with compatibility shims enabled. – Dai Nov 11 '21 at 21:41

0 Answers0