ApplicationPool.ManagedRuntimeVersion 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置当前应用程序池中用于托管应用程序的.NET Framework的版本。
public:
property System::String ^ ManagedRuntimeVersion { System::String ^ get(); void set(System::String ^ value); };
public string ManagedRuntimeVersion { get; set; }
member this.ManagedRuntimeVersion : string with get, set
Public Property ManagedRuntimeVersion As String
属性值
应用程序池使用的.NET Framework的版本号。 默认值为“v2.0”。
示例
以下示例列出了 属性的值 ManagedRuntimeVersion 以及其他应用程序池属性的值。 此代码示例是为 ApplicationPool 类提供的一个更大示例的一部分。
// If the applicationPool is stopped, restart it.
if (applicationPool.State == ObjectState.Stopped)
{
applicationPool.Start();
}
注解
当前有效值为“v2.0”和“v1.1”。 在 IIS 服务器上安装新版本的 .NET Framework 时,将接受其他值。
可以使用此属性来配置当前应用程序池的托管运行时版本。 若要为服务器上的所有应用程序池设置默认值,请使用 ApplicationPoolDefaults 对象。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈