SharePoint

Syrinx SharePoint Team Blog
Need help on your project? info@syrinx.com, or toll free (888) 579-7469, press 1

News



Need help with your SharePoint project?

Syrinx works with clients throughout New England and across the United States to architect, design, develop, and deploy SharePoint implementations. Working on fully outsourced projects, as part of your team, helping to train your team, or rescuing projects in trouble, we are comfortable doing it all. Projects from a couple weeks to several months in duration, reference clients available. Contact us today - info@syrinx.com, or toll free (888) 579-7469 and press 1 to speak to someone now!

Warming Up SharePoint Servers After Cold Restart

Everyone knows how painful it is to try reaching a MOSS page after an IIS reset or a server reboot; what happens is ASP.NET performing page and resource compilation and caching. You can help your users save frustration by simply touching every MOSS web application once after a cold restart. Of course you would prefer to automate such a task instead of firing up a browser every time your server restarts. Isn't it easier to click on an icon on your desktop and warm-up all those 20 SharePoint servers at once?

To create a warm up script we can use Microsoft's own XMLHTTP object from XML DOM suit and Windows Scripting. The simplest VB script to touch a web page would look like:

' Check if a site url specified
if wscript.Arguments.Count <> 1 Then
wscript.Echo
"Please specify a url!"
wscript.Quit
end If
Dim
xmlHttp
Set xmlHttp = CreateObject("Msxml2.ServerXMLHTTP.3.0")
If Err.Number <> 0 Then Set xmlHttp = CreateObject("Microsoft.XMLHTTP")
If Err.Number <> 0 Then wscript.Quit
wscript.Echo
"Touching " & CStr(wscript.Arguments(0))
xmlHttp.Open
"GET", CStr(wscript.Arguments(0)), False
xmlHttp.Send

And you can call this script from a batch file using wscript.exe or cscript.exe tools which run the script in the Windows script Host:

wscript c:\warmup.vbs "http://moss.com/site"

So just add such a command for all your moss sites to a batch file and run after each cold restart.

Comments

No Comments