我可以使用.NET 4.0 App Pool运行.NET 2.0运行Web应用程序吗?

时间:2017-01-24 09:35:35

标签: c# asp.net .net iis iis-7

我可以使用.NET 4.0 App Pool运行.NET 2.0运行Web应用程序吗?? ??

我在Web应用程序的Web.config中添加了以下节点:

<startup>
    <supportedRuntime version="v2.0.50727"/>
</startup>

这意味着我的应用程序使用.NET 2.0 CLR运行。

我将它添加到ISS中的应用程序,应用程序池设置为.NET 4.0并进行了快速冒烟测试。它适用于正常情况。

参考下图。应用程序的名称是LMSInterface。

enter image description here

它会无缝运行吗??或者这样做是否有任何隐藏的复杂性/问题...... ??

1 个答案:

答案 0 :(得分:1)

可以做到:

fly -t tutorial e -c task_ubuntu_16_uname.yml
executing build 9
initializing
running uname -a
Linux 58069086-7a27-43f8-71ff-374bcaef0c6d 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
succeeded

这是我的测试:

enter image description here

enter image description here

enter image description here

enter image description here