by Carmel Schvartzman
- In this walkthrough we will explain how to deploy a plug-in in the CRM server:
- First, copy the DLL containing the plug-in to the server directory: this have to be the following : C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly
- Next, because we'll be using the Plugin Registration Tool that comes with the CRM 2011 SDK, copy that GUI to some directory at the CRM server:I copied the app to the C:\Plugintool directory.
- Double click the PluginRegistration tool:
- Now, press CONNECT to discover your CRM webservice:If your CRM server hosts more than one Organization, select the one to wich you developed your plug-in
- Check that the selected CRMService URL is the one you want to deploy your plug-in
- Now press "REGISTER" and next "REGISTER NEW ASSEMBLY":
Now select the assembly you want to deploy:
It's strongly recommended that you set up the ISOLATION MODE to "SANDBOX": the SANDBOX feature gets code executed in an isolated and trusted environment. In the case your plug-in consumes too much server resources, SANDBOX mode will remove it from the event pipeline where you registered your code. Also, the same will be done in case of continuous failing.
IMPORTANT: the assembly can be stored in the DISK or in the DATABASE. At the development stage, it's recommended you store it at the DISK, because there you can also copy the .PDB file used for debugging purposes. Later, when you finished testing your code, YOU MUST DEPLOY IT TO THE DATABASE!! Why? Some reasons are:
- The assemblies registered on database can be included in a solution hosted in sandbox or in CRM ONLINE.
- If your CRM server is load balancing, storing the DLLs in DATABASE will allow CRM to automize the process of updating and deploying changes.
- There's no need to restart the CRM servicesmaking IISRESET on the applicationpool because the update of an assembly will take effect automatically after you press the UPDATE button.So instead of selecting "DATABASE" select the option "DISK" for now.
That's all
Happy programming :-)
כתב: כרמל שוורצמן
No comments:
Post a Comment