Andrew Kennel

Web Developer

Update to SPWakeUp script

April 07, 2008

I made a small update to my SPWakeUp tool today. You can download a copy at: http://code.msdn.microsoft.com/spwakeup It’s something I should have done long ago: error catching! I noticed that when I included our MySites URL in the list of sites to wake up, the script was bombing. Turns out that when you create the…

I made a small update to my SPWakeUp tool today. You can download a copy at: http://code.msdn.microsoft.com/spwakeup

It’s something I should have done long ago: error catching! I noticed that when I included our MySites URL in the list of sites to wake up, the script was bombing. Turns out that when you create the MySites web app, Sharepoint doesn’t create a matching Site. As users create their own MySites, they are created as new Site Collections. So, when my tool tries to wakeup the root site, it fails because there’s no site there.

In the end, I did what I should have done in the first version of the tool, I wrapped my attempt to open the site in a Try/Catch block.
Here’s the new code:
try
{string webresult = GetWebPage(siteurl);
Console.Write(webresult);}
catch
{Console.Write(“Cannot reach site: ” + siteurl);}

Share This Post