4

Closed

IIS 7.5 application pools startMode="AlwaysRunning" ?

description

Discussed here: http://msbuildextensionpack.codeplex.com/discussions/280676
Hello all,
 
The end game is that I need to set startMode="AlwaysRunning" in ApplicationHost.config:
 

 
 
<system.applicationHost>
   <applicationPools>
...
       <add name="myAppPool" autoStart="true" startMode="AlwaysRunning">
 
   </applicationPools>
...
 
 
Have dug through the source code of 4.0.5.0 and it appears that the Application pool class in the web administration dll lacks this property?
 
Microsoft.Web.Administration.dll
 
[assembly: AssemblyVersion("7.0.0.0")]
 
[assembly: AssemblyInformationalVersion("6.1.7600.16385")]
 
public sealed class ApplicationPool : ConfigurationElement
{
    public bool AutoStart { get; set; }
    public ApplicationPoolCpu Cpu { get; }
    public bool Enable32BitAppOnWin64 { get; set; }
    public ApplicationPoolFailure Failure { get; }
    public ManagedPipelineMode ManagedPipelineMode { get; set; }
    public string ManagedRuntimeVersion { get; set; }
    public string Name { get; set; }
    public ApplicationPoolProcessModel ProcessModel { get; }
    public long QueueLength { get; set; }
    public ApplicationPoolRecycling Recycling { get; }
    public ObjectState State { get; }
    public WorkerProcessCollection WorkerProcesses { get; }

    public ObjectState Recycle();
    public ObjectState Start();
    public ObjectState Stop();
}
Does any know how I can set startMode="AlwaysRunning" I tried to find a newer version of
Microsoft.Web.Administration.dll but all my servers seem to have this version?
 
 
I'm happy to submit a patch once I figure it out.
 
Kind regards,
 
Andrew Stone.
Closed Mar 29, 2012 at 8:58 PM by mikeFourie

comments

mikeFourie wrote Mar 29, 2012 at 8:58 PM

Hi

Feel free to submit a patch or alternatively use the XMLFile task.

Mike



** Closed by mikeFourie 29/03/2012 13:58

mikeFourie wrote Mar 29, 2012 at 8:58 PM

clearing release

Stonie wrote Mar 29, 2012 at 10:11 PM

Thanks for your speedy closure Mike!

For others reading this feel free to do this in an exec task in regular MsBuild exec:
%windir%\system32\inetsrv\appcmd.exe set apppool "theAppPool" /startMode:AlwaysRunning