Iis – What does the “.NET Framework Version” setting in IIS actually do

asp.netiisnet

This seems like an obvious question, but I'm trying to determine what the "Change .NET Framework Version" button on the top level IIS configuration panel actually changes. On all of my servers, it has always been left at v2.0. My application pools are a mixture of v2.0 and v4.0 and all of my v4.0 applications operate correctly.

So, what does this version number control? What would rely on this that wouldn't be assigned to an application pool? Seems strange.

The setting in question is pictured below:

enter image description here

Best Answer

It makes IIS point to different root level config files for .NET. These root level files reside within the framework installation folders in %systemroot%\Microsoft.NET\Framework\<version>\CONFIG

IIS looks for config files for itself in %systemroot%\system32\inetsrv\config\applicationHost.config
and for .NET in
%systemroot%\Microsoft.NET\Framework\<version>\CONFIG\machine.config

Changing the .NET Version switches which machine.config get used. For example, changing it to v2.050727 will have it look at %systemroot%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config. Changing to v4.0.30319 will have it look at %systemroot%\Microsoft.NET\Framework\v4.0.30319\CONFIG\machine.config

Applications inherit things from the root level config settings.

Have a look at this article that outlines the config system and shows the configuration hierarchy.