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?

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

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.


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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x