报告的 aspnet 版本号是意外的

Reported version number of aspnet is unexpected

我正在用 C#(VS 2013 更新 4)实现一个 MVC 5 网站,并且构建设置的目标是 .NET Framework 版本 4.5。但是,当我加载页面时,我看到以下 header 条目:

X-AspNet-Version:4.0.30319

尽管编译设置指向 .NET 4.5,但为什么网站 运行 在 .NET 4.0xxxx 下?有什么想法吗?

提前致谢。

That is not the actual .NET framework version. It is the version of the CLR.

From .NET 4 up to 4.5.2 it is version 4. Between 2.0 and 3.5 it was version 2.0.

That is also the reason that in your application pool configuration you can only choose .NET 2 or 4.

See MSDN: .NET Framework Versions and Dependencies on this matter.