One of the most read pages on my blog is the list of reasons why a callout won't work. Since the release of CRM 4.0 we do not have callouts anymore, but we're using plug-ins for extending CRM. This article will contain all the reasons that I find on why a plug-in is not working.
There are multiple reasons why this error can occur. These reasons include:
- The plug-in is registered on disk, but the file is not located in the correct location (drive:\crm server folder\server\bin\assembly\). Keep in mind that if you use the registration tool that the plug-in will be registered, but the file will not be placed in the right location. This is a manual step.
- The plug-in is registered on disk and the file is located in the correct location, but the security settings are not correctly set on the assembly file. Once you have copied the file to the \server\bin\assembly folder, make sure that you check the permissions of the file. The user which is used to run the application pool in which CRM is running, should have read & execute rights. You can set this by going to the folder and right click on your plugin its dll file. Then press "Properties". Go to the tab "Security" and add the user which is used for the application pool. This user you can figure out in the IISManager. There look at the properties of the CRM website to find out which application pool is used. Then look in the application pool's properties to find out the identity. Most likely this is "Network Service" but it could be changed in your situation.
After setting the security settings, make sure to perform an IISreset.
- Your environment exists out of multiple servers and the plugin is registered on disk. In this situation make sure that the file is placed in the \server\bin\assembly folder on all servers. Also the security should be set correctly (see other possible reason).
Possible reasons for this error include
- The code does use a reference to the webservices, but uses credentials which do not have enough privileges in CRM
- The plug-in does is created for the non default instance. In this case, look at the following kb article: http://support.microsoft.com/kb/948746. From there you can request a hotfix for this issue.
This error shows up even though the user is a System Administrator. The cause is that the user is not a member of the Deployment Administrators group in CRM Deployment Manager. Once you have added yourself to that group it will work. Keep in mind that you will need to login as an administrator to be able to open the Deployment Manager.
This error seems to come from a piece of code in the synchronous plug-in framework which forces the CrmService to use the localhost. George has written a post on the logic behind this.
The solution is to either run the plug-in asynchronous or otherwise make the webservice available from the localhost.
Update: There is a hotfix available for this issue now: http://support.microsoft.com/kb/950542
As soon as I run into other issues with plug-ins, I'll definitely add them to this list.