将.NET Framework应用程序池版本更改为3.5?
时间:2020-03-06 14:59:18 来源:igfitidea点击:
我已经在Web服务器(Server 2008 Enterprise)上安装了.NET Framework 3.5 SP1,因此运行IIS 7.0。
我想更改现有站点使用的.NET Framework版本。因此,我右键单击适当的"应用程序池",然后选择"编辑应用程序池"。 .NET Framework下拉列表不包含框架3.5的显式条目,而仅包含2.0.50727.
这仅仅是因为3.5中的核心RTL版本仍然是2.0吗?还是我需要做一些其他事情才能让IIS看到3.5版? (尝试重新启动IIS)。
解决方案
Is this just because the version of the core RTL in 3.5 is still 2.0?
是的
除了具有正确配置的web.config外,我们无需执行其他任何操作
有问题的下拉列表使用的是加载到应用程序池的进程空间中的CLR版本,该版本必须是唯一的(我们不能将1.1 CLR加载到已经加载了2.0 CLR的进程中,反之亦然)。
但是,.NET 3.5使用v2.0 CLR,唯一添加的是新版本的库以及一些围绕VB.NET和C#的新功能的编译器支持。如果选择3.5,则只要程序集引用3.5版本的程序集,就将使用3.5.
3.5框架仍在2.0 CLR之上运行,因此我们所看到的是正确的。
斯科特·汉塞尔曼(Scott Hanselman)撰写了一篇不错的博客文章,内容如下:
The marketing term ".NET Framework 3.5" refers to a few things. First, LINQ, which is huge, and includes new language compilers for C# and VB. Second, the REST support added to Windows Communication Foundation, as well as, third, the fact that ASP.NET AJAX is included, rather than a separate download as it was before in ASP.NET 2.0. There's a few other things in .NET 3.5, like SP1 of .NET 2.0 to fix bugs, but one way to get an idea of what's been added in .NET 3.5 is to look in c:\windows\assembly.
我们只是在服务器(Windows Server 2003 / IIS6)上安装了3.5框架,然后重新启动,仅此而已。
当然,我们必须针对框架的3.5版开发应用程序,但这与从1.1到2.0的更改不同,在该版本中,我们需要使用IIS管理器更改网站属性中的.Net设置。