The CRM Grid – A Microsoft CRM Blog

Greg Owens’ rose-tinted MS-CRM mumblings

Restarting the CRM application pool

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.

Advertisements

No comments yet»

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: