ApplicationPoolDefaults.AutoStart Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether the application pool is automatically started when IIS is started.
public:
property bool AutoStart { bool get(); void set(bool value); };
public bool AutoStart { get; set; }
member this.AutoStart : bool with get, set
Public Property AutoStart As Boolean
Property Value
true
if the application pool should start automatically; otherwise, false
. The default is true
.
Examples
The following example sets the AutoStart property and creates and commits a new application pool. This code example is part of a larger example provided for the ApplicationPoolDefaults class.
Console.WriteLine("AutoStart:\t{0}",
manager.ApplicationPoolDefaults.AutoStart.ToString());
manager.ApplicationPoolDefaults.AutoStart = false;
manager.ApplicationPoolDefaults.Cpu.Limit = 26;
manager.ApplicationPoolDefaults.Recycling.PeriodicRestart.Time = TimeSpan.FromMinutes(1000);
// Create a new application pool.
ApplicationPoolCollection applicationPoolCollection = manager.ApplicationPools;
applicationPoolCollection.Add("new app pool");
// Commit the changes to ApplicationHost.config file.
manager.CommitChanges();
Remarks
A value of true
indicates to the World Wide Web Publishing Service (WWW service) that the application pool should be automatically started when it is created or when IIS is started.