Recently I have been creating Application Pool in IIS for Asp.Net Websites. What seems surprising to me is that those App Pools were having v4.0 , while the websites were targeting .Net framework v4.5 / v4.5.1
Entry in Web.config of Individual websites:
and this is what is App Pool Settings:
Isn’t it like for targetFramework=”4.5″, App Pool version should be 4.5, for targetFRamework=”4.5.1″, App Pool version should be 4.5.1 ?
Does App Pool version 4.0 handles all Web Application/Websites developed in 4.5 and 4.5.1 as well ?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The Application Pool displays the Asp.NET runtime versions, which you can also say as CLR versions.
With the new Asp.NET framework versions various new libraries/functionalities/features are introduced along with (possibly) new Compiler, Build Target files.
As observed from below table, there are NO new CLR versions introduced with framework versions 4.5 -> 4.5.1 ->4.5.2 ... This means any website developed using framework v4.5/v4.5.1/v4.5.2 target CLR version 4 and hence use Application Pool version 4.0
The .NET Framework versions 2.0, 3.0, and 3.5 are built with the same version of the CLR (CLR 2.0). These versions represent successive layers of a single installation. Each version is built incrementally on top of the earlier versions. And therefore you will see Application Pool v2.0 for these frameworks.
In short,
Framework Version != App Pool Version
App Pool Version = CLR Version
CLR Version = Folders at location: C:WindowsMicrosoft.NETframework
The version folders at location C:WindowsMicrosoft.NETframework contains the Compiler and Target build files for Asp.NET runtime
Method 2
Yes, the 4.0 pool does just as you wished.
Depending on the IIS version you are using, you might see different texts (.NET Framework v4.0.30319 or CLR v4.0.30319) in IIS Manager for application pool settings, but they all mean CLR version. (managedRuntimeVersion is the actual XML setting). All .NET Framework 4.x releases use the same CLR version of 4.0.
The actual ASP.NET version of that machine used to host your web apps depends only on the .NET Framework you installed (4.5/4.5.1 following your assumption).
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

