2

I'm not sure where to begin or even if my thinking is in the right direction. Hopefully someone here can tell me what to do or at least give me a direction to start travelling.

I work on a Intranet Website, that contains multiple MVC3 and Coldfusion Applications. I have set the AppPool to Recycle every morning at 2:00 AM. Now, I would like to create a Scheduled Task to reload every application contained under that IIS Website so that when the first user comes in in the morning, they don't have to wait 30 seconds to 2minutes for their application to be reloaded into the IIS AppPool.

Is there an easy to to do this? As I see it my only options are:

  • Writing a bash script, inserting each website manually to load
  • Writing a program that would try to find every application and load them

Now, if there those are my only options, is there possibly a .NET Library I can tap into that would allow me to easily find the MVC3 Applications under IIS?

mawburn
  • 187
  • 1
  • 12

2 Answers2

1

Use the Application Initialization Module to do it: http://www.iis.net/download/ApplicationInitialization

There was an older version of this module but this is the newly re-written version. It's still in CTP but appears fairly stable.

Also this module appears to be included by default with Server 2012 and IIS8

Brent Pabst
  • 6,069
  • 2
  • 24
  • 36
0

We usually create a scheduled task that runs wget every few minutes to perform the initial load. This can run from any computer. There is a "warm-up" feature with IIS 7 but I really don't see how it could be simpler than using wget.

wget.exe --quiet --secure-protocol=SSLv3 --no-check-certificate sitename.domainname.com  

Also note that if your site is not pre-compiled, the user will still incur a delay for each page that has not been compiled. The best thing to do would be to use aspnet_compiler.exe to do that for you in the build process.

"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe" -f ^  
-v "/" -p "%~dp0..\..\SourceWebSiteFolder" ^  
-d -fixednames "%~dp0..\..\PublishedWebSiteFolder"  
Greg Askew
  • 35,880
  • 5
  • 54
  • 82
  • The "warm-up" feature was replaced with the Initialization module. While wget will work for a basic scenario the module allows for greater control over what a user might see before the application is fully loaded and ready for that first request. – Brent Pabst Jul 09 '12 at 14:29