Export (0) Print
Expand All

ManagedRuntimeVersion Property

IIS 7.0

Gets or sets the version of the .NET Framework that is used for managed applications in the current application pool.

Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public string ManagedRuntimeVersion { get; set; }

Property Value

Type: System..::..String
The version number of the .NET Framework that is used by the application pool. The default is "v2.0".

Current valid values are "v2.0" and "v1.1". Additional values will be accepted when new versions of the .NET Framework are installed on the IIS server.

You can use this property to configure the managed runtime version of the current application pool. To set default values for all application pools on the server, use the ApplicationPoolDefaults object.

The following example lists the value of the ManagedRuntimeVersion property as well as values of other application pool properties. This code example is part of a larger example provided for the ApplicationPool class.

// If the applicationPool is stopped, restart it.
if (applicationPool.State == ObjectState.Stopped)
{
    applicationPool.Start();
}


Community Additions

ADD
Show:
© 2014 Microsoft