Set application pool to AlwaysRunning - Advanced Installer Community
davidesharpe
Posts: 56
Joined: Fri Jul 01, 2011 4:56 am

Set application pool to AlwaysRunning

Is there a simple way in Advanced Installer to set an App Pool to "AlwaysRunning=true", Also is there a way to set the "Preload=true" of a Web Site
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set application pool to AlwaysRunning

Hello,

In order to achieve that you need to do the following:

1) "The 'Preload' feature of a Website requires the IIS8 Application Initialization feature. To enable it you can add a Windows Feature bundle in the prerequisites page add enable the IIS → World Wide Web Services → Application Development Feature → Application Initialization feature.
Also you can select the Target OS as: Windows 8, Windows 8.1, Windows Server 2012 and Windows Server 2012 R2

2) In order to set the App Pool to "AlwaysRunning=true" you can select your Application Pool and add a Custom property like this:
Attribute ID Section
Section: <ApplicationPool>
Name: startMode

Attribute Value: Section
Value:AlwaysRunning

3)Unfortulately, we don't have predefined support for the 'Preload' feature of a Web Site. However, this can be done through a custom action.
So, you can go in the Custom Actions page and add the predefined Launch File custom action with sequence. You have to add this custom action between InstallExecute and InstallFinalize standard actions.
You can edit the launch file custom action properties like that:

File to Launch: [SystemFolder]inetsrv\appcmd.exe
Command Line: set app "MyWebSite/" /preloadEnabled:true
Also you have to set the Execution time as When the system is being modified(deffered) and set in the Execution Stage Condition only on Install with the VersionNT >= 602 statement in the Condition field.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidesharpe
Posts: 56
Joined: Fri Jul 01, 2011 4:56 am

Re: Set application pool to AlwaysRunning

"AutoStart" application pools are also available in IIS 7.5 with the Application Initialisation module, so we need to be able to achieve this for IIS 7.5 also.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set application pool to AlwaysRunning

Hello,

Please take a look on our How to check for Initialisation module in IIS forum thread which debates a similar problem.

Note that you should also modify the Condition field for the above Launch File custom action and use the VersionNT >= 601 statement.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set application pool to AlwaysRunning

Hello,

The Support for IIS 8.0 Application Initialization has been added in version 11.1 of Advanced Installer released on April 28th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”