共用方式為


ApplicationPool.ManagedRuntimeVersion 屬性

定義

取得或設定用於目前應用程式集區中受控應用程式的.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時,將會接受其他值。

您可以使用這個屬性來設定目前應用程式集區的 Managed 執行時間版本。 若要設定伺服器上所有應用程式集區的預設值,請使用 ApplicationPoolDefaults 物件。

適用於