通过


ProcessModelSection.Enable 属性

定义

获取或设置一个值,该值指示是否启用进程模型。

public:
 property bool Enable { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enable", DefaultValue=true)]
public bool Enable { get; set; }
[<System.Configuration.ConfigurationProperty("enable", DefaultValue=true)>]
member this.Enable : bool with get, set
Public Property Enable As Boolean

属性值

true 如果启用了进程模型,则为否则,为 false. 默认值为 true

属性

示例

下面的代码示例演示如何访问 Enable 属性。


// Get the current Enable property value.

bool enable = processModelSection.Enable;

// Set the Enable property to false.
processModelSection.Enable = false;
' Get the current Enable property value.
Dim enable As Boolean = processModelSection.Enable

' Set the Enable property to false.
processModelSection.Enable = False

注解

Enable 属性指定 ASP.NET 是否托管在外部工作进程中。 true如果是Enable,则 ASP.NET 托管在外部工作进程中;否则,它直接在 Inetinfo.exe中运行。

注释

不建议在 Inetinfo.exe 中运行 ASP.NET,因为这涉及到在本地系统安全上下文中运行应用程序。 当 ASP.NET 在 Internet Information Services (IIS) 6 本机模式下运行时,此设置将被忽略,因此通常没有理由将其 false设置为。

适用于