Search code examples
asp.net.net.net-framework-version

.Net framework version shown is not correct


I'm using IIS 8.5, .Net Framework version 4.7.2 installed. My legacy web application target framework is set to 4.7.2. As per my knowledge, it uses .Net CLR version v4.0. But, I'm confused with attached error where it show app is running under .Net Framework Version is 4.0. Please suggest how to validate this, I'm not sure why it is not showing 4.7.2.enter image description here


Solution

  • 4.0 is what you're supposed to see here. There are only 3 total IIS .Net runtimes for ASP.Net: 1.0, 2.0, 4.0. Even in these three, you rarely see 1.0 any more. Also, there is no 3.0 or 3.5 (they really still target 2.0), and Core is separate from IIS.

    All the other point versions you may use, such as 4.7.2, resolve to one of those three runtimes within IIS.

    Think of it this way: every version of .Net for 4.x has the same set of IL it can use. New point releases may add new features and types, but they still compile down to some set of 4.0-compatible IL. The addition of new types is why you may need to actually install 4.7.2 on the server before your site will run, but it's still IL for the 4.0 runtime.

    If you really had a .Net version conflict, you'd see a 500-series HTTP error. This is only a 404. You need to find out why it doesn't see your test.aspx file.