且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IIS防爆preSS和ASP.NET 2.0

更新时间:2023-02-11 19:08:15


  1. 您不能使用 / CLR 开关与 /网站开关

  2. 您可以CLR版本设置为一个应用程序,而不是一个网站(一个网站可以有多个应用程序)

  3. 要CLR版本设置为一个应用程序,更改应用程序的applicationPool的 managedRuntimeVersion
    (编辑位于%USERPROFILE%\\我的文档\\ iis的前preSS \\设置\\ 对ApplicationHost.config 并设置applicationPool的 managedRuntimeVersion 以期望的值)。

如果您已经安装了WebMatrix中,您可以通过用户界面做到这一点。
1.打开WebMatrix中
2.打开网站
3.单击设置选项卡
4.选择.NET Framework版本

For IIS 7.5 Express, I understand that I can set the CLR version to 2.0 for a site from the command line using the /clr:v2.0 command line argument. For the life of me, I cannot find the documentation that explains how to specify it when using the /site argument. I would have thought it goes in the applicationhost.config file but damned if I can find it. Since the CLR version is website specific I would have thought it went into the section but...shrug.

Thanks for any help you can provide.

  1. You CANNOT use /clr switch with /site switch
  2. You can set clr version to an application, but not a site (A site can have multiple applications)
  3. To set clr version to an application, change the application's applicationPool's managedRuntimeVersion (Edit the applicationhost.config located in %userprofile%\my documents\iis express\config\ and set the applicationPool's managedRuntimeVersion to desired value).

If you have installed WebMatrix, you can do it through UI. 1. Open WebMatrix 2. open site 3. Click Settings tab 4. select the .net framework version