About

MS MVP Logo

View Marc Lognoul [MVP]'s profile on LinkedIn

Disclaimer

The information and materials in this site are provided "AS IS" with no warranties, and confering no rights. This site does not represent the thoughts, intentions, plans or strategies of our employers, customers, friends or family, solely our own personal opinions.

Yet another SharePoint warm-up script

by marc 11. February 2009 09:12

Slow start-up of ASP.Net applications after application pool recycle in general and SharePoint in particular, is a recurring issue reported by customers. Keeping the application “warm” thanks to a background job performing regular page processing is a quick and simple solution. While there are already a few scripts available on the Internet, I wanted to share my own, which is fully implemented in PowerShell. A few comment though:

  • This script, like (all or most of?) others, do not take care of having multiple WFE. when it resolves  the name of a web application, it will do it using DNS and therefore might point to another server… 8I’ll shortly publish another script that solves that limitation
  • To ease IIS log parsing for analytics, the script passes a specific user-agent string which eases exclusion of those requests in reports
  • The script triggers only the execution of default pages (default.aspx) which are located under the final / of the URL. Next version of the script will also solve that limitation

Feel free to download it from this location: http://www.marc-antho-etc.net/scriptdetail.aspx?script=spWarmup.ps1.txt

Have you seen Client Eastwood’s latest (and probably best?) movie Gran Torino? A perfect Drama/Comedy mix with great though less known actors.

Gran Torino poster

And cut!

Tags:

Comments

3/12/2009 5:40:42 PM #

Emmanuel ISSALY

Interesting implementation, using the sharepoint dlls instead of shelling stsadm.

Tried it and it iterates ok, but doesnt warmup anything, sadly. What could be wrong?

Emmanuel ISSALY

3/13/2009 9:53:37 AM #

Marc

Hello Emmanuel,

The most commion cause is the fact that the user running the script is not granted Full Read Access (like the default content access account) on the web application(s) to be warmed-up. Hitting IIS sites without being able to get authenticated and authorized will not trigger SharePoint execution.

KR,
Marc

Marc

Comments are closed