Version 4 plugin registration fails after moving CRM 2011 to another server.

Answered Version 4 plugin registration fails after moving CRM 2011 to another server.

  • Saturday, May 26, 2012 12:32 AM
     
     

    I installed CRM 2011 on a new server due to server failure.  CRM 4 plugins that registered fine on the previous CRM 2011 server, no longer register on the new 2011 server.  The old server had CRM 4 on it in the past, but was removed and upgraded to CRM 2011.

    Any ideas why these failures occur?  I've tried registering the CRM 4 SDK dll's in the GAC with no luck.  If I register a plugin and then try to register a step, I get the following error:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load the plugin type: MY.CRMVBPlugins.MY.CRMVBPlugins.OpportunityCalculateFee
    Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <ErrorCode>-2147204720</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>Unable to load the plugin type: MY.CRMVBPlugins.MY.CRMVBPlugins.OpportunityCalculateFee</Message>
      <Timestamp>2012-05-26T00:25:28.7590442Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147204720</ErrorCode>
        <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>Unable to load the plugin type: MY.CRMVBPlugins.MY.CRMVBPlugins.OpportunityCalculateFee</Message>
        <Timestamp>2012-05-26T00:25:28.7590442Z</Timestamp>
        <InnerFault>
          <ErrorCode>-2147220970</ErrorCode>
          <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
          <Message>System.IO.FileLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #DAA3F7E9</Message>
          <Timestamp>2012-05-26T00:25:28.7590442Z</Timestamp>
          <InnerFault i:nil="true" />
          <TraceText i:nil="true" />
        </InnerFault>
        <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.Create(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
       at PluginRegistrationTool.RegistrationHelper.RegisterStep(CrmOrganization org, CrmPluginStep step) in C:\CRM5SDK\sdk\tools\pluginregistration\RegistrationHelper.cs:line 408
       at PluginRegistrationTool.StepRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in C:\CRM5SDK\sdk\tools\pluginregistration\StepRegistrationForm.cs:line 698


    If I register an assembly that contains a CRM 4 workflow, this error is issued:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.
    Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>An unexpected error occurred.</Message>
      <Timestamp>2012-05-26T00:27:02.7476164Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147220970</ErrorCode>
        <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>System.IO.FileLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #1857E7AF</Message>
        <Timestamp>2012-05-26T00:27:02.7476164Z</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.Create(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
       at PluginRegistrationTool.RegistrationHelper.RegisterPlugin(CrmOrganization org, CrmPlugin plugin) in C:\CRM5SDK\sdk\tools\pluginregistration\RegistrationHelper.cs:line 297
       at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in C:\CRM5SDK\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 585

All Replies

  • Saturday, May 26, 2012 10:16 PM
     
     Answered

    After much work where I finally resorted to file by file comparison of an old backup of the original system to the new system, I found that the web.config file in the new system was missing the following binding redirects that were present in the old system.  I'm putting this here in case anyone else encounters this problem and wastes as much time as I did.

      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.Crm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <location>
        <system.webServer>
          <handlers>
            <remove name="ExtensionlessUrl-ISAPI-4.0_64bit" />
          </handlers>
        </system.webServer>
      </location>

    </configuration>

    • Marked As Answer by simdoc Saturday, May 26, 2012 10:16 PM
    •  
  • Wednesday, August 22, 2012 7:35 PM
     
     

    Thank you for your update.

    I was having a similar problem and this helped me track it down.

  • Thursday, October 18, 2012 10:11 PM
     
     

    Hi,

    I'm also getting similar error. Could you please tell me where I have to add the runtime code which you specified?

    Venkat


    • Edited by Venkat1986 Thursday, October 18, 2012 10:12 PM
    •  
  • Thursday, October 18, 2012 10:40 PM