[英]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.