Answered by:
Do we really need IIS Reset and Async Services restart when we depoly plug-in or custom workflow - CRM 2011

Question
-
Hi All,
I would like to understand the concept about IIS Reset & Async Service resetart when someone deploy plug-in & custom workflow.
I know that if we deploy assembly on disk then, we will have to restart IIS bcoz IIS doesn't allow you to reaplce it as it has taken the hold of that old assembly.
Can anyone guide me for the scenario when I deploy my assembly on database and if for some reason, I update that assembly, do I need to resart IIS (for sync plugin) or Async service (for custom workflwo assembly)?
Also what if I only update plugin step of async plugin?
Thanks in advance!!
Regards, Suraj Fegade (Microsoft Dynamics CRM)
Wednesday, June 25, 2014 3:38 AM
Answers
-
There is one other scenarion when you need to recycle the CrmAppPool application pool. If you modify the parameters that are available for a Custom Workflow Activity, then CRM will not make any new parameters available when editing the workflow until after recycling the application pool.
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
- Marked as answer by Suraj Fegade Wednesday, June 25, 2014 8:52 AM
Wednesday, June 25, 2014 8:50 AMModerator -
Hi Suraj,
Whenever I have deployed Plugins in database, I have not required any IISRESET or restart of Async Services whatsoever. They work just fine.
However, the following content from the MSDN explains why it's necessary (or rather a good practice) to restart the Async Services after deploying asynchronous plugins or workflows:
"You should stop the asynchronous service before you unregister a plug-in that was registered to execute asynchronously. Stopping the service prevents a situation where an asynchronous registered plug-in has been queued for execution but for which there is no plug-in assembly currently registered. For example, consider the situation in which a plug-in has been registered to execute asynchronously and the related event has fired. After the asynchronous operation has been queued by the queue manager, you then unregister (delete) the plug-in assembly from the Microsoft Dynamics CRM database. In this case, an error occurs when the asynchronous service tries to execute the queued asynchronous operation but the plug-in assembly no longer exists."
Also, an IISRESET is actually not needed, only restarting the CRM App Pool is enough (so as not to disturb any other application running in the same host).
- Marked as answer by Suraj Fegade Wednesday, June 25, 2014 8:52 AM
Wednesday, June 25, 2014 3:47 AM
All replies
-
Hi Suraj,
Whenever I have deployed Plugins in database, I have not required any IISRESET or restart of Async Services whatsoever. They work just fine.
However, the following content from the MSDN explains why it's necessary (or rather a good practice) to restart the Async Services after deploying asynchronous plugins or workflows:
"You should stop the asynchronous service before you unregister a plug-in that was registered to execute asynchronously. Stopping the service prevents a situation where an asynchronous registered plug-in has been queued for execution but for which there is no plug-in assembly currently registered. For example, consider the situation in which a plug-in has been registered to execute asynchronously and the related event has fired. After the asynchronous operation has been queued by the queue manager, you then unregister (delete) the plug-in assembly from the Microsoft Dynamics CRM database. In this case, an error occurs when the asynchronous service tries to execute the queued asynchronous operation but the plug-in assembly no longer exists."
Also, an IISRESET is actually not needed, only restarting the CRM App Pool is enough (so as not to disturb any other application running in the same host).
- Marked as answer by Suraj Fegade Wednesday, June 25, 2014 8:52 AM
Wednesday, June 25, 2014 3:47 AM -
Hi,
Thanks for great input. :)
If I am correct, the content from MSDN refers to situation where you are deleting the registered plugin. The situation I am refering is about updating the registerd assembly. I hopt for that too we don't need any IIS Reset or Async restart, it will automatically start executing to new logic written in updated assembly.
Thanks in advance!!
Regards, Suraj Fegade (Microsoft Dynamics CRM)
Wednesday, June 25, 2014 4:46 AM -
Hello,
We don't need to do iisreset after every deployment/updation (updating assembly version should be fine), but you may require it sometime when you want to debug your plugin and you are not getting required process.
Our Website| Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.Wednesday, June 25, 2014 5:16 AMModerator -
There is one other scenarion when you need to recycle the CrmAppPool application pool. If you modify the parameters that are available for a Custom Workflow Activity, then CRM will not make any new parameters available when editing the workflow until after recycling the application pool.
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
- Marked as answer by Suraj Fegade Wednesday, June 25, 2014 8:52 AM
Wednesday, June 25, 2014 8:50 AMModerator