Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does asp.net running on .net 4.8 add a http header x-aspnet-version: 4.0.30319

I do have .net 4.8 installed. When i create a new simple asp.net mvc application using visual studio 2019 and start the website using the builtin IIS-Express, it will add the following header:

  • x-aspnet-version: 4.0.30319

The same header is also added when i'm hosting the site using IIS. I am aware that i can remove this header (and i will), but i would like to understand the version number. It seems version 4.0.30319 was the initial .net 4.0 version number. What is the point to have this in the http header when using .net 4.8?

like image 512
Manuel Avatar asked Feb 18 '20 08:02

Manuel


People also ask

How do I remove X Aspnetmvc version from header?

Removing X-AspNet-Version Header Open the Web. Config file, find the node <httpRuntime> under <system. web> add the enableVersionHeader attribute to httpRuntime node and set it to false.

What does NET Framework 4.8 do?

Net Framework 4.8, the latest version of the company's application development framework for Windows. The update brings a number of bug fixes, security patches, and improvements to the Common Language Runtime, ASP.Net, Windows Forms, Windows Presentation Foundation, and Windows Communication Foundation.

Does .NET 4.8 include 4.7 2?

if you have 4.8 then you have 4.7. 2 automatically. did you install developer pack or runtime?

Is .NET Framework 4.8 the last version?

NET Framework 4.8 is the last version of . NET Framework. . NET Framework is serviced monthly with security and reliability bug fixes. . NET Framework will continue to be included with Windows, with no plans to remove it.


1 Answers

That is the CLR version.

  • All .NET Framework 4 versions use CLR 4.0.30319.xxxxx
  • xxxxx is less than 42000 for .NET Frameworks 4 to 4.5.2
  • xxxxx is greater than 42000 for .NET Frameworks 4.6 and higher

The xxxxx extension is not part of the header for security purposes, so as not to divulge the patch state of the server.

like image 92
Nathan Miller Avatar answered Nov 15 '22 08:11

Nathan Miller