Yeah yeah, we've heard that criticism a lot. Why is it that SharePoint likes IISReset so much?
Well, I think a lot of the flak is to some extent undeserved. I guess some of this comes from "Umm it ain't workin' lets try IISReset".
Well, here is a list of things that requires definitvely requires IISReset:
- Anything you deploy to the GAC, because IIS likes to cache GAC assemblies. If you simply deployed to bin, a lot of IISResets will go away.
- Anything that changes any of the config files
- Changing the web.config will recompile the web app anyway, so it feels like an IISReset - you can get around this by creating a seperate config entry, or when deploying WCF endpoints, creating a seperate config file as I demonstrated earlier.
- Any of the XML files that make up SharePoint, this means adding a new custom field type, or new site definition etc.
Thats about it :-)
See, it's not so bad, now is it? Also, in Windows 2008, you have a new command to manage IIS, and one of the things it lets you do .. is to recycle a particular application pool, so it's a whole lot quicker.
You simply use this command -
%windir%\system32\inetsrv\appcmd recycle AppPool <AppPoolName>
In Win2k3, you can achieve the same by using this command -
C:\WINDOWS\system32\cscript.exe C:\WINDOWS\system32\iisapp.vbs /a MSSharePointPortalAppPool /r
See, it's not so bad now .. is it?