简体   繁体   English

如何使用命令行将IIS7中的ISAPI和CGI限制功能的.net Framework v2.0更改为v4.0?

[英]How to change .net framework v2.0 to v4.0 for ISAPI and CGI restrictions feature in IIS7 using command line?

I have tried to change .net framework version using below command line with .net framework v4.0 path. 我试图使用.net framework v4.0路径在下面的命令行中更改.net framework版本。 but it works only for restriction enable/disable but not changed .net framework version. 但是它仅适用于限制启用/禁用,但不能更改.net Framework版本。

C:\\Windows\\System32\\inetsrv\\appcmd set config /section:isapiCgiRestriction /[path='c:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_isapi.dll'].allowed:True C:\\ Windows \\ System32 \\ inetsrv \\ appcmd设置配置/ section:isapiCgiRestriction / [路径='c:\\ windows \\ Microsoft.NET \\ Framework \\ v4.0.30319 \\ aspnet_isapi.dll']。allowed:True

Please see below snapshots 请看下面的快照 在此处输入图片说明

在此处输入图片说明

Please provide me any good solutions. 请提供任何好的解决方案。

Thanks 谢谢

There is no such thing as .NET Framework version for specific IIS module , Isapi and CGI Restrictions in your case. 在您的情况下,没有适用于特定IIS模块的 .NET Framework版本,Isapi和CGI限制。 The menu item refers to global .NET Framework version setting in IIS (same you see in the right-side action panel on the first screenshot). 菜单项引用IIS中的全局 .NET Framework版本设置(与您在第一个屏幕截图的右侧操作面板中看到的相同)。 In fact, the setting controls what version of the framework to assign to an application pool when you create one. 实际上,该设置控制在创建应用程序池时分配给应用程序池的框架版本。 You can use the following command: 您可以使用以下命令:

appcmd.exe set config -section:system.applicationHost/applicationPools /applicationPoolDefaults.managedRuntimeVersion:"v4.0" /commit:apphost

When you execute it all new application pools will have .NET Framework 4.0 assigned. 执行它时,所有新的应用程序池都将分配有.NET Framework 4.0。 However, on my box the setting in the dialog from second screenshot remains 2.0 (looks like UI/usability bug to me). 但是,在我的盒子上,第二个屏幕截图的对话框中的设置仍为2.0(对我来说,似乎是UI /可用性错误)。 See this for more details. 请参阅了解更多详情。

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

相关问题 .NET v4.0中无法识别的属性“enableSsl” - Unrecognised attribute 'enableSsl' in .NET v4.0 我们可以在Windows Server IIS上同时使用.NET Core v1.1和v2.0吗 - Can we use both .NET Core v1.1 and v2.0 on windows Server IIS IIS 应用程序池 CLR v4.0 与无托管代码 - IIS Application pools CLR v4.0 vs No managed code 如果应用程序池为v2.0版本,则IIS中缺少FBA提供程序,.NET角色,.NET用户 - FBA Providers, .NET Roles, .NET Users, missing in IIS if App Pool is in v2.0 version ASP.NET Core 3.1 运行在 IIS .NET CLR v4.0 和集成托管必须是每个 APP 的池吗? - ASP.NET Core 3.1 run on IIS .NET CLR v4.0 and integrated managed must be a pool for each APP? IIS7在.net 4.0 CLR下运行.net 2.0应用程序 - IIS7 running .net 2.0 application under .net 4.0 CLR 当appPool在v2.0 .NET Framework下运行时,为什么我的应用程序会有重定向问题? - Why does my application have redirection issues when the appPool runs under a v2.0 .NET Framework? IIS AppPool配置为使用.NET Framework 4.0仍在使用2.0 - IIS AppPool configured to use .NET Framework 4.0 is still using 2.0 MSDeploy-无法将.NET v4.5程序包部署到v4.0应用程序池 - MSDeploy - Cannot deploy .NET v4.5 package to v4.0 Application Pool 使用 IIs6 或 IIs7 的命令行更改 IIS 中虚拟目录或站点的物理路径 - change physical path for virtual directory or site in IIS using command line for IIs6 or IIs7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM