简体   繁体   English

IIS 为我的 AppPool 使用哪个版本的 .NET Framework?

[英]Which version of the .NET Framework is IIS using for my AppPool?

.Net Framework 4.5 was installed on my machine and on the IIS Application Pool, I set the .NET CLR version to 4.0. .Net Framework 4.5 安装在我的机器和 IIS 应用程序池上,我将 .NET CLR 版本设置为 4.0。

My question is when running .NET code in this IIS site, which framework version is it using: 4.0 or 4.5 ?我的问题是在这个 IIS 站点中运行 .NET 代码时,它使用的是哪个框架版本: 4.0 或 4.5 ?

Please see below screen shots.请参阅下面的屏幕截图。

inetmgr 截图

已安装程序截图

The AppPool's .NET CLR Version is different from the .NET Framework Version. AppPool 的 .NET CLR 版本与 .NET Framework 版本不同。

The .NET CLR Version 4.0 is the CLR base for the following .NET Framework Versions: .NET CLR 4.0 版是以下 .NET Framework 版本的 CLR 基础:

  • 4 4
  • 4.5 (including 4.5.1 and 4.5.2) 4.5(包括4.5.1和4.5.2)
  • 4.6 (including 4.6.1 and 4.6.2 Preview) 4.6(包括4.6.1和4.6.2预览)

So having a .NET CLR Version of 4.0 just means you support the above Frameworks, which will run under their deployed framework version.因此,拥有 .NET CLR 版本 4.0 仅意味着您支持上述框架,这些框架将在其部署的框架版本下运行。

Source: https://docs.microsoft.com/en-us/dotnet/standard/clr#clr-versions来源: https : //docs.microsoft.com/en-us/dotnet/standard/clr#clr-versions

Update Feb 2020: 2020 年 2 月更新:

Here is a full mapping of CLR to .NET Framework versions, based off this official documentation.这是基于此官方文档的 CLR 到 .NET Framework 版本的完整映射。 https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies#version-information https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies#version-information

CLR 1.0 CLR 1.0

.NET Framework 1.0 .NET 框架 1.0


CLR 1.1 CLR 1.1

.NET Framework 1.1 .NET 框架 1.1


CLR 2.0 CLR 2.0

.NET Framework 2.0 .NET 框架 2.0

.NET Framework 3.0 .NET 框架 3.0

.NET Framework 3.5 .NET 框架 3.5


CLR 4 CLR 4

.NET Framework 4 .NET 框架 4

.NET Framework 4.5 .NET 框架 4.5

.NET Framework 4.5.1 .NET 框架 4.5.1

.NET Framework 4.5.2 .NET 框架 4.5.2

.NET Framework 4.6 .NET 框架 4.6

.NET Framework 4.6.1 .NET 框架 4.6.1

.NET Framework 4.6.2 .NET 框架 4.6.2

.NET Framework 4.7 .NET 框架 4.7

.NET Framework 4.7.1 .NET 框架 4.7.1

.NET Framework 4.7.2 .NET 框架 4.7.2

.NET Framework 4.8 .NET 框架 4.8

Follow the below steps to get the .Net Version Used by IIS.按照以下步骤获取 IIS 使用的 .Net 版本。

  1. Open IIS Manager.打开 IIS 管理器。 For information about opening IIS Manager, see Open IIS Manager (IIS 7).有关打开 IIS 管理器的信息,请参阅打开 IIS 管理器 (IIS 7)。
  2. On the Connections pane, expand the server node and click Application Pools.在连接窗格上,展开服务器节点并单击应用程序池。
  3. On the Application Pools page, select the application pool for which you want to specify a .NET Framework version, and then click Basic Settings in the Actions pane.在“应用程序池”页面上,选择要为其指定 .NET Framework 版本的应用程序池,然后在“操作”窗格中单击“基本设置”。
  4. In the Edit Application Pool dialog box, in the .NET Framework version list, Check the version of .Net Framework.在“编辑应用程序池”对话框的 .NET Framework 版本列表中,检查 .Net Framework 的版本。 -> Get this version -> 获取这个版本
  5. Navigate to the Directory and check the details of the clr.dll-> C:\\Windows\\Microsoft.NET\\Framework64\\Version_got_from_step_4\\clr.dll导航到目录并检查 clr.dll-> C:\\Windows\\Microsoft.NET\\Framework64\\Version_got_from_step_4\\clr.dll 的详细信息

Versions of .Net above 4.0 are being upgraded as in-place and the installed version can be checked in the registry path - HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\release or version 4.0 以上的 .Net 版本正在就地升级,可以在注册表路径中检查安装的版本 - HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\release or version

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM