"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу

Monday 20 June 2011

Plugin Registration Tool Error in CRM 2011 OR "Can not Deploy / Update / Register Plugin in CRM 2011"

 Plugin Registration tool used in CRM 2011 may throw some generic error messages while registering or updating the plugin assembly. Following scenario is one of them.




As this error message is more generic, its a bit difficult to identify the exact secario.


Error Message:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly fullnames must be unique (ignoring the version build and revision number).
Detail: <OrganizationServiceFault xmlns="
http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorCode>-2147204741</ErrorCode>
  <ErrorDetails xmlns:a="
http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Plug-in assembly fullnames must be unique (ignoring the version build and revision number).</Message>
  <Timestamp>2011-06-20T10:04:09.615489Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204741</ErrorCode>
    <ErrorDetails xmlns:a="
http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Plug-in assembly fullnames must be unique (ignoring the version build and revision number).</Message>
    <Timestamp>2011-06-20T10:04:09.615489Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
   at PluginRegistrationTool.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly) in C:\Users\Administrator\Desktop\CRMTools\CrmSDK2011\tools\pluginregistration\RegistrationHelper.cs:line 427
   at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in C:\Users\Administrator\Desktop\CRMTools\CrmSDK2011\tools\pluginregistration\PluginRegistrationForm.cs:line 371


So one possible scenario could be the user may not have enough privilege to deploy the plugin. The user who is trying to register the plugin must exist in the Deployment Administrator group of Deployment Manager. Otherwise the user would get the above error while registering the plugin or when trying to update the existing plugin. This is a security restriction in CRM 2011. System Administrator user Account can always deploy or update the plugin. By default System Administrator account would be included in the Deployment Administrator group.

How to check deployment Administrator privilege:

Its very easy to check the deployment Administrator privilege. Navigate to Deployment Manager to see the list of Deployment Administrators. You could include the user in the Deployment Administrator group by clicking on 'New Deployment Administrator' option.Please refer the screen shot below.




4 comments:

  1. Any other suggestions? I'm a Deployment Admin.

    ReplyDelete
  2. Iam getting below error while registering the plugin in the PluginRegistration tool



    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveLiveIdIssuerEndpoints(IdentityProviderTrustConfiguration identityProviderTrustConfiguration)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AddLiveIssuerEndpointsToCrossRealmIssuers(IdentityProviderTrustConfiguration identityProviderTrustConfiguration)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.SetAuthenticationConfiguration()
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
    at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
    at Microsoft.Xrm.Sdk.Client.ServiceProxy`1..ctor(Uri uri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
    at Microsoft.Crm.Tools.PluginRegistration.CrmConnection.get_DiscoveryService()
    at Microsoft.Crm.Tools.PluginRegistration.CrmConnection.RetrieveOrganizations()
    at Microsoft.Crm.Tools.PluginRegistration.ConnectionsForm.OpenConnection(CrmConnection con)

    ReplyDelete
    Replies
    1. Hi, Kiranmahi

      Did you ever resolve the problem with error...

      "Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified"


      I have the exact same issue, but cannot find any info on this issue. Do you have any advice you can can offer?

      Thank you

      Delete
  3. hello there, Please check this ...http://crmdm.blogspot.co.uk/2011/02/crm-cannot-find-plugin-assembly-or-one.html

    ReplyDelete