如何在 Windows Server 2012 R2 的 IIS 8.5 上注册 Dot net framework 4.6.2
How to register Dot net framework 4.6.2 on IIS 8.5 in Windows Server 2012 R2
我从 this 路径安装了 dot net framework 4.6.2 & 现在想在 IIS 中注册它。
如果它是较早的框架版本(2.0、3.5 等)和较早的服务器(例如 Windows 2003),我会输入以下命令
在适当的路径中。
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -i
但是,我在这台服务器上找不到4.6.2的文件夹路径。甚至从这里安装此命令也会给出以下消息:
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0 Administration
utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved. Start
installing ASP.NET (4.0.30319.0). This option is not supported on
this version of the operating system. Administrators should instead
install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows
Features On/Off" dialog, the Server Manager management tool, or the
dism.exe command line tool. For more details please see
http://go.microsoft.com/fwlink/?LinkID=216771. Finished installing
ASP.NET (4.0.30319.0).
我知道消息中的网络 link 是针对 4.5 的,因为 4.5 是 4.0 的就地升级。
我的网站出现此错误:
The 'targetFramework' attribute in the element of the
Web.config file is used only to target version 4.0 and later of the
.NET Framework (for example, '').
The 'targetFramework' attribute currently references a version that is
later than the installed version of the .NET Framework. Specify a
valid target version of the .NET Framework, or install the required
version of the .NET Framework.
web.config的相关部分是:
<system.web>
<compilation debug="true" targetFramework="4.6.2"/>
<httpRuntime targetFramework="4.6.2"/>
</system.web>
原来我下载错了安装程序。它是 4.6,而我需要可用的 4.6.2 here。
这个问题值得删除,但我不会,因为其他人可能会犯同样的罪。
当您 select 应用程序池的 .NET CLR 版本时,IIS 将不会显示 .NET 4.6.2 应用程序池。 4.0 和 4.6.2 都将使用 .NET CLR Version v4.0.30319.
这里是link供参考:
https://forums.iis.net/t/1237493.aspx?Link+net+framework+4+6+2+windows+2012R2+to+IIS
对于目标框架 4.6 的应用程序,请使用这些路径注册(取决于 Windows 的 x64 或 x86 版本):
X86: %windir%\Microsoft.NET\Framework\v4.0.30319
X64: %windir%\Microsoft.NET\Framework64\v4.0.30319
在命令提示符下,首先进入上述目录之一
然后 运行
aspnet_regiis.exe -i
在应用程序池设置中使用 .Net Framework v4.0.30319
我从 this 路径安装了 dot net framework 4.6.2 & 现在想在 IIS 中注册它。
如果它是较早的框架版本(2.0、3.5 等)和较早的服务器(例如 Windows 2003),我会输入以下命令 在适当的路径中。
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -i
但是,我在这台服务器上找不到4.6.2的文件夹路径。甚至从这里安装此命令也会给出以下消息:
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0 Administration utility to install and uninstall ASP.NET on the local machine. Copyright (C) Microsoft Corporation. All rights reserved. Start installing ASP.NET (4.0.30319.0). This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool. For more details please see http://go.microsoft.com/fwlink/?LinkID=216771. Finished installing ASP.NET (4.0.30319.0).
我知道消息中的网络 link 是针对 4.5 的,因为 4.5 是 4.0 的就地升级。
我的网站出现此错误:
The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.
web.config的相关部分是:
<system.web>
<compilation debug="true" targetFramework="4.6.2"/>
<httpRuntime targetFramework="4.6.2"/>
</system.web>
原来我下载错了安装程序。它是 4.6,而我需要可用的 4.6.2 here。
这个问题值得删除,但我不会,因为其他人可能会犯同样的罪。
当您 select 应用程序池的 .NET CLR 版本时,IIS 将不会显示 .NET 4.6.2 应用程序池。 4.0 和 4.6.2 都将使用 .NET CLR Version v4.0.30319.
这里是link供参考:
https://forums.iis.net/t/1237493.aspx?Link+net+framework+4+6+2+windows+2012R2+to+IIS
对于目标框架 4.6 的应用程序,请使用这些路径注册(取决于 Windows 的 x64 或 x86 版本):
X86: %windir%\Microsoft.NET\Framework\v4.0.30319
X64: %windir%\Microsoft.NET\Framework64\v4.0.30319
在命令提示符下,首先进入上述目录之一 然后 运行
aspnet_regiis.exe -i
在应用程序池设置中使用 .Net Framework v4.0.30319