SharePoint 2007 “Warm Up”

I was running into an issue where the initial connection to a SharePoint 2007 server was taking between 20 to 40 seconds. Once the first page of the SharePoint site loaded the server had a very acceptable response speed. So what was causing that initial delay each morning? The answer is actually quite simple if you understand the basics of ASP.NET. The first time a user visits an ASP.NET application, such as SharePoint, the framework performs some compiling and caching on the server. This compiling and caching requires a bit of time to accomplish and once completed the application will respond much quicker.

The compiling and caching always occurs after an IISRESET is issued or the application pool is recycled for an application. In the case of my SharePoint installation, the application pool recycles every morning at around 1am. This means that the first person to hit the SharePoint site in the morning always experiences what they perceive as poor performance of the server. After that initial page hit the system performed with very acceptable speed. I did a few searches on the internet to see how others are resolving this issue. One solution I saw was to schedule a "warm up" script to automatically do an HTTP get request against a couple pages on the SharePoint site. This looked very promising; however, I was soon disappointed when the script appeared to not have any impact on the performance of my server. I soon figured out the reason is that the script was doing an anonymous HTTP get request and my SharePoint site required user credentials to log in. This gave me an idea… how about creating a simple .NET console application that can perform an HTTP get request using credentials.

So I set off to create the utility. The initial version was quite basic. It accepted 3 parameters; a URL, a username and a password. The utility would make a get request based on the URL and would do that using the provided credentials. This was a good start, but I was a bit worried about security. I really didn’t want to have a username and password sitting visible in a "warm up" script on the server. I went back and modified the utility so that a user could register a URL with its username and password. This information is stored in an XML configuration file with the password encrypted. Now the utility can run and perform a HTTP get against the SharePoint site without exposing the password in plain text on the server’s file system. Very cool stuff.

I took the utility, registered my SharePoint server URLs and passwords and then created a simple batch file to call the utility. This batch was then scheduled on the server to run in the mornings on a daily basis. Since implementing this script and utility the users have been very happy with the performance of SharePoint.

I have zipped up the utility I created and have placed it on my server for download. Feel free to download and use the utility in your environment.

A note about security: although the password is encrypted in the XML file it is still not 100% secure. You should apply appropriate permissions on the directory where this utility resides to prevent non-administrators from gaining access. You assume all responsibility for any security vulnerabilities, problems, or damages caused by using the utility.

So how do you use this utility? Unzip it into a directory, open up a command prompt, switch to the directory where the utility resides and then execute the command httpgetwithpwd. This will provide you with an overview of the options. Most likely the first thing you will want to do is to register a URL with its username and password. You do this with the following command:

Httpgetwithpwd [URL] [username] [password]

Replace [URL],[username] and [password] with the appropriate values.

Now to have the utility do an HTTP request,just call the utility with the URL. For example:

Httpgetwithpwd http://mySharePoint.com

This will do an HTTP get for the specified URL using the stored username and password.

You may be wondering where the URL, username and passwords are stored when you register them. An XML file will be created in the same directory as the utility that contains the URL information. You can open this file and see that the password is encrypted.

It may be tempting to register several URLs and then copy the configuration XML file to another server to use with the httpgetwithpwd utility. Be aware that this will not work. The encryption locks the configuration file to the server it was created on. Using the configuration file on another server will result in an invalid password being passed to during the HTTP get process.

This utility was created in a very short time span and doesn’t have a robust error handler and it won’t prevent you from registering a URL multiple times. Be smart about how you use the utility and it will work well for you.

0 thoughts on “SharePoint 2007 “Warm Up””

  1. http://www.salesid.com
    http://belts.salesid.com Belts
    http://caps.salesid.com Caps
    http://clothing.salesid.com Clothing
    http://glasses.salesid.com Glasses
    http://handbags.salesid.com Handbags
    http://shoes.salesid.com Shoes
    http://wallets.salesid.com Wallets
    http://watches.salesid.com Watches
    http://www.salesid.com/adidas/ Adidas
    http://www.salesid.com/shoes/asics/ Asics
    http://www.salesid.com/shoes/bape-stars/ Bape Stars
    http://www.salesid.com/shoes/christian-louboutin/ Christian Louboutin
    http://www.salesid.com/shoes/clarks-sandal/ Clarks Sandal
    http://www.salesid.com/shoes/converse/ Converse
    http://www.salesid.com/shoes/dolce-gabbana/ Dolce Gabbana
    http://www.salesid.com/shoes/dsquared-2/ Dsquared 2
    http://www.salesid.com/shoes/gucci/ Gucci
    http://www.salesid.com/shoes/ice-cream/ Ice Cream
    http://www.salesid.com/shoes/lacoste/ Lacoste
    http://www.salesid.com/shoes/louis-vuitton/ Louis Vuitton
    http://www.salesid.com/shoes/new-balance/ New Balance
    http://www.salesid.com/shoes/nike/ Nike
    http://www.salesid.com/shoes/prada/ Prada
    http://www.salesid.com/shoes/puma/ Puma
    http://www.salesid.com/shoes/supra/ Supra
    http://www.salesid.com/shoes/timberland-boots/ Timberland Boots
    http://www.salesid.com/shoes/ugg-boots/ UGG Boots
    http://www.salesid.com/belts/ Belts Catalog
    http://www.salesid.com/caps/ Caps Factory
    http://www.salesid.com/clothing/ Clothing Shop
    http://www.salesid.com/glasses/ Glasses Wholesale
    http://www.salesid.com/handbags/ Handbags Supplier
    http://www.salesid.com/shoes/ Shoes Catalogue
    http://www.salesid.com/wallets/ Wallets Discount
    http://www.salesid.com/watches/ Watches Original
    ——————————————————————
    http://www.saletoo.com
    http://belts.saletoo.com Belts
    http://caps.saletoo.com Caps
    http://clothing.saletoo.com Clothing
    http://glasses.saletoo.com Glasses
    http://handbags.saletoo.com Handbags
    http://shoes.saletoo.com Shoes
    http://wallets.saletoo.com Wallets
    http://watches.saletoo.com Watches
    http://www.saletoo.com/adidas/ Adidas
    http://www.saletoo.com/shoes/asics/ Asics
    http://www.saletoo.com/shoes/bape-stars/ Bape Stars
    http://www.saletoo.com/shoes/christian-louboutin/ Christian Louboutin
    http://www.saletoo.com/shoes/clarks-sandal/ Clarks Sandal
    http://www.saletoo.com/shoes/converse/ Converse
    http://www.saletoo.com/shoes/dolce-gabbana/ Dolce Gabbana
    http://www.saletoo.com/shoes/dsquared-2/ Dsquared 2
    http://www.saletoo.com/shoes/gucci/ Gucci
    http://www.saletoo.com/shoes/ice-cream/ Ice Cream
    http://www.saletoo.com/shoes/lacoste/ Lacoste
    http://www.saletoo.com/shoes/louis-vuitton/ Louis Vuitton
    http://www.saletoo.com/shoes/new-balance/ New Balance
    http://www.saletoo.com/shoes/nike/ Nike
    http://www.saletoo.com/shoes/prada/ Prada
    http://www.saletoo.com/shoes/puma/ Puma
    http://www.saletoo.com/shoes/supra/ Supra
    http://www.saletoo.com/shoes/timberland-boots/ Timberland Boots
    http://www.saletoo.com/shoes/ugg-boots/ UGG Boots
    http://www.saletoo.com/belts/ Belts Distributor
    http://www.saletoo.com/caps/ Caps Outlet
    http://www.saletoo.com/clothing/ Clothing Cheap
    http://www.saletoo.com/glasses/ Glasses Wholesaler
    http://www.saletoo.com/handbags/ Handbags Business
    http://www.saletoo.com/shoes/ Shoes Custom
    http://www.saletoo.com/wallets/ Wallets Selection
    http://www.saletoo.com/watches/ Watches Manufacturer

  2. http://www.globallaptopbattery.co.uk/mitac/mim2120.htm Mitac mim2120 Battery
    http://www.globallaptopbattery.co.uk/sony/pcga-bp2e.htm Sony pcga-bp2e Battery
    http://www.globallaptopbattery.co.uk/sony/pcg-tr3.htm Sony pcg-tr3 Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bpl2.htm Sony vgp-bpl2 Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bpl2c.htm Sony vgp-bpl2c Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bpl5a.htm Sony vgp-bpl5a Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bps2.htm Sony vgp-bps2 Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bps2a.htm Sony vgp-bps2a Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bps2b.htm Sony vgp-bps2b Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bps2c.htm Sony vgp-bps2c Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bps5.htm Sony vgp-bps5 Battery
    http://www.globallaptopbattery.co.uk/sony/vgp-bps5a.htm Sony vgp-bps5a Battery
    http://www.globallaptopbattery.co.uk/toshiba/nb100.htm Toshiba nb100 Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa2487.htm Toshiba pa2487 Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3128u.htm Toshiba pa3128u Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3191u.htm Toshiba pa3191u Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3191u-1brs.htm Toshiba pa3191u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3206.htm Toshiba pa3206 Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3285u-1bas.htm Toshiba pa3285u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3285u-1brs.htm Toshiba pa3285u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3285u-3bas.htm Toshiba pa3285u-3bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3331u-1bas.htm Toshiba pa3331u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3331u-1brs.htm Toshiba pa3331u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3356u.htm Toshiba pa3356u Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3356u-1bas.htm Toshiba pa3356u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3356u-1brs.htm Toshiba pa3356u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3356u-2brs.htm Toshiba pa3356u-2brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3356u-3brs.htm Toshiba pa3356u-3brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3383.htm Toshiba pa3383 Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3383u-1brs.htm Toshiba pa3383u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3395u-1brs.htm Toshiba pa3395u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3399u-1bas.htm Toshiba pa3399u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3399u-1brs.htm Toshiba pa3399u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3399u-2bas.htm Toshiba pa3399u-2bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3399u-2brs.htm Toshiba pa3399u-2brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3420u.htm Toshiba pa3420u Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3421u-1brs.htm Toshiba pa3421u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3451u.htm Toshiba pa3451u Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3451u-1brs.htm Toshiba pa3451u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3456u-1brs.htm Toshiba pa3456u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3465u-1brs.htm Toshiba pa3465u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3479u-1brs.htm Toshiba pa3479u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3480u-1brs.htm Toshiba pa3480u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3533u-1bas.htm Toshiba pa3533u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3533u-1brs.htm Toshiba pa3533u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3534u-1bas.htm Toshiba pa3534u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3534u-1brs.htm Toshiba pa3534u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3535u-1bas.htm Toshiba pa3535u-1bas Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3535u-1brs.htm Toshiba pa3535u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3536u.htm Toshiba pa3536u Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3536u-1brs.htm Toshiba pa3536u-1brs Battery
    http://www.globallaptopbattery.co.uk/toshiba/pa3537u-1bas.htm Toshiba pa3537u-1bas Battery

Leave a Reply