Archive for August, 2009
So you’re developing plug-ins and you need to redeploy your DLL periodically since it is otherwise “in use” or there is some other reason that is asking for a full iisreset. Since a full reset is a bit invasive and global (e.g. this is a production server which also runs SharePoint, website or goodness knows what else), why not recycle the application pool instead?
Of course, we can do this via IIS Manager with a bit of point and click – but this can’t be automated and it’s a bit fiddly. Instead, do it from the command line with this handy bit of text:
cscript c:\windows\system32\iisapp.vbs /a "CrmAppPool" /r
Recycling the application pool is distinctly quicker than doing a full iisreset (though admittedly there are some scenarios when recycling the application pool is insufficient – no idea on the specifics though! See here, perhaps). I find this especially useful in the post-build events of Visual Studio (Project > %ProjectName% Properties > Build Events) to ensure that copying my DLLs always works without manually intervention.