locked
Error After UR 12 install (IFD) RRS feed

  • Question

  • I posted this on the Dynamics Community (https://community.dynamics.com/product/crm/f/117/p/100965/192119.aspx#192119), but I thought I would see if anyone on technet could assist as well

    After the installation of UR 12 my CRM 2011 deployment no longer worked. I am receiving the message below:

    An error has occurred.

    Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

    System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Crm.MainApplication.Application_Error(Object sender, EventArgs eventArguments)

     

     

    After turning on tracing I found an exception being thrown every time I try to load a crm page, Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory'. I double checked that Microsoft.CRM v 5.0.0.0 was not in C:\Windows\assembly, there were no entries for Microsoft.CRM. I have installed every UR sequentially. I have NO idea what could be causing this and am now rolling back to UR 11

     

    Here is a copy of the full tracing:

    # CRM Tracing Version 2.0
    # LocalTime: 2013-02-05 20:18:12.494
    # Categories: *:Verbose
    # CallStackOn: No
    # ComputerName: CRM2011
    # CRMVersion: 5.0.9900.1010
    # DeploymentType: OnPremise
    # ScaleGroup:
    # ServerRole: AppServer, AsyncService, DiscoveryService, ApiServer, HelpServer, DeploymentService, SandboxServer, DeploymentManagementTools

    [2013-02-05 20:18:12.494] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | MapOrgUtility.SetOrganizationInformation  ilOffset = 0x83
    >MapOrgEngine: Retreived the OrgId[{193A2E1C-B6FD-DE11-AAED-001DD8B71C1A}] for URL[http://crm2011/cms/main.aspx].
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | MainApplication.Initialize  ilOffset = 0x2E
    >Exception occurred in Application_OnBeginRequest: System.TypeLoadException: Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
       at Microsoft.Crm.WebServices.ImportXmlService.InitializePerformanceCounters()
       at Microsoft.Crm.ServerPerformanceCounterInitializer.Microsoft.Crm.IApplicationInitializer.Initialize()
       at Microsoft.Crm.RunInitializerTracker.TryRun(Type typeOfInitializer, RunInitializerDelegate RunInitializerDelegate)
       at Microsoft.Crm.ApplicationInitializer.Microsoft.Crm.IApplicationInitializer.Initialize()
       at Microsoft.Crm.MainApplication.Initialize(String nameCallerMethod)
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ErrorInformation.LogError  ilOffset = 0x17
    >MSCRM Error Report:
    --------------------------------------------------------------------------------------------------------
    Error: Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

    Error Message: Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

    Source File: Not available

    Line Number: Not available

    Request URL: http://crm2011/cms/main.aspx

    Stack Trace Info: [TypeLoadException: Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
       at Microsoft.Crm.WebServices.ImportXmlService.InitializePerformanceCounters()
       at Microsoft.Crm.ServerPerformanceCounterInitializer.Microsoft.Crm.IApplicationInitializer.Initialize()
       at Microsoft.Crm.RunInitializerTracker.TryRun(Type typeOfInitializer, RunInitializerDelegate RunInitializerDelegate)
       at Microsoft.Crm.ApplicationInitializer.Microsoft.Crm.IApplicationInitializer.Initialize()
       at Microsoft.Crm.MainApplication.Initialize(String nameCallerMethod)
       at Microsoft.Crm.MainApplication.Application_OnBeginRequest(Object sender, EventArgs eventArguments)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | FaultHelper.ConvertToFault  ilOffset = 0x0
    >TryConvertToFaultExceptionInternal: exception: System.TypeLoadException
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.DumpExceptionToTrace  ilOffset = 0x11
    >----- dump exception/fault tree (TryConvertToFaultExceptionInternal: before) -----
    >>>>>> EXCEPTION: 0
    >Type: System.TypeLoadException
    >Message (162): Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    >StackTrace: present: 1EE284F4
    >no PluginTrace
    >InnerException <null>
    ><<<<< EXCEPTION: 0
    >
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ConvertToFault  ilOffset = 0x24
    >NestingDepth: 24
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ConvertToFault  ilOffset = 0x57
    >ToSingleFaultUntyped: enter
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ToSingleFaultUnTyped  ilOffset = 0x0
    >ToSingleFault/FE<OSF>: enter
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ConvertToFault  ilOffset = 0x57
    >UNEXPECTED: no fault?
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ToSingleFaultUnTyped  ilOffset = 0x3A
    >ToSingleFaultOther: enter
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ConvertMessageAndErrorCode  ilOffset = 0x46
    >enter: ConvertMessageAndErrorCode: System.TypeLoadException: Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ConvertMessageAndErrorCode  ilOffset = 0x23B
    >System.TypeLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #284AB452: System.TypeLoadException: Could not load type 'Microsoft.Crm.CrmPerformanceCounterFactory' from assembly 'Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    >   at Microsoft.Crm.WebServices.ImportXmlService.InitializePerformanceCounters()
    >   at Microsoft.Crm.ServerPerformanceCounterInitializer.Microsoft.Crm.IApplicationInitializer.Initialize()
    >   at Microsoft.Crm.RunInitializerTracker.TryRun(Type typeOfInitializer, RunInitializerDelegate RunInitializerDelegate)
    >   at Microsoft.Crm.ApplicationInitializer.Microsoft.Crm.IApplicationInitializer.Initialize()
    >   at Microsoft.Crm.MainApplication.Initialize(String nameCallerMethod)
    >   at Microsoft.Crm.MainApplication.Application_OnBeginRequest(Object sender, EventArgs eventArguments)
    >   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    >   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ConvertMessageAndErrorCode  ilOffset = 0x28B
    >exit: ConvertMessageAndErrorCode: errorCode: 0x80040216; message: System.TypeLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #284AB452
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ToSingleFaultCommon  ilOffset = 0x16
    >ToSingleFaultCommon: enter
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ToSingleFaultCommon  ilOffset = 0xAE
    >no PluginTrace
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ToSingleFaultCommon  ilOffset = 0x12F
    >no CrmExceptionFaults
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.ToSingleFaultCommon  ilOffset = 0x183
    >IncludeCallStack: True
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.TryConvertToFaultExceptionInternal  ilOffset = 0xAD
    >TryConvertToFaultExceptionInternal: new FE<OSF>
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | ExceptionConverter.DumpExceptionToTrace  ilOffset = 0x11
    >----- dump exception/fault tree (TryConvertToFaultExceptionInternal: after) -----
    >>>>>> EXCEPTION: 0
    >Type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.BaseServiceFault]
    >Message (132): System.TypeLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #284AB452
    >StackTrace <null>
    >no PluginTrace
    >>>>>> FAULT: 0
    >ErrorCode: 0x80040216: ErrorCodes.UnExpected
    >Message (132): System.TypeLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #284AB452
    >Timestamp: present
    >TraceText <null>
    >CallStack: present: 1EE284F4
    >InnerFault <null>
    ><<<<< FAULT: 0
    >InnerException <null>
    ><<<<< EXCEPTION: 0
    >
    [2013-02-05 20:18:12.510] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:    9 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 5e61b532-3b73-495a-9f2c-5fa29dea3a4f | MainApplication.Application_Error  ilOffset = 0x58E
    >Application is not initialized and an error has occurred
    Wednesday, February 6, 2013 2:46 AM

Answers

  • I contacted Microsoft about this issue, see the fix below:

    After installing the Update Rollup (initially UR12 but also UR14 gave the same results),  CRM was not accessible, a generic error was presented on the web page and in the Event Log we could see a .Net TypeLoadException trying to load CrmPerformanceCounterFactory.

    This appeared to be a DLL version issue and using Process Explorer from the Sysinternals website I was able to see that Microsoft.Crm.Webservices.dll was being loaded from an unusual location: c:\Windows\Microsoft.Net\assembly\GAC_MSIL, and the DLL there was old.  I renamed the Microsoft.Crm.Webservices folder there plus I removed all the Microsoft.crm.* files under C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\<ID>\<ID> to ensure no older cached DLL’s were being used.  After an iisreset the CRM UI now mostly loaded but in any of the grid panes we were getting a Generic SQL error.

    After we resolved the performance counter problem, we were getting a common generic SQL error that was resolved with the below steps:

    Generic SQL Error

    Using SQL Profiler I was able to determine that the error was related to a query that was being executed against the PrincipalObjectAccessReadSnapshot table in the CRM Org database, that query was trying to retrieve a column called ObjectTypeCodeName that did not exist in the table definition.  Researching in our internal knowledgebase I found another case with the same issue that included a script that fixes the problem by removing the references to the existence of this column in the table from our metadata, the script is:

                   delete from MetadataSchema.Attribute where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')

                   delete from AttributeIds where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')

    Note that this script needs to be run against all CRM Org databases in the deployment, it should remove 4 rows in total.

    • Marked as answer by smfpride Wednesday, July 24, 2013 6:05 PM
    Wednesday, July 24, 2013 6:05 PM

All replies

  • Are you on Rollup 11 v2?

    Did you reboot after installing RU 12?

    Can you copy paste the installation log file from RU 12, maybe it has some info that we can use to find out why the GAC is missing Microsoft.Crm.* dlls.


    Kids don't try this at home!

    Sunday, February 10, 2013 7:04 AM
  • Yes, I am on Rollup 11 v2.

    Yes I rebooted after installing RU 12

    Where can I find the install log?
    Friday, February 15, 2013 3:41 PM
  • Any suggestions?
    Wednesday, February 20, 2013 9:08 PM
  • I noticed that the Rollup was not installed properly or maybe the files were corrupt. I did a Reboot, uninstalled UR 12 and Rebooted again. Then the error message dissapeared. I got the latest version from MSDN (UR12), installled again, Reboot and and it was working.


    B. Kasami

    Friday, March 8, 2013 10:20 AM
  • I tried UR13 and had the same problem.

    @frenkie: I downloaded UR 12 and 13 multiple times, as well as tried rebooting after install multiple times. Nothing seems to help.

    Monday, April 1, 2013 7:25 PM
  • I contacted Microsoft about this issue, see the fix below:

    After installing the Update Rollup (initially UR12 but also UR14 gave the same results),  CRM was not accessible, a generic error was presented on the web page and in the Event Log we could see a .Net TypeLoadException trying to load CrmPerformanceCounterFactory.

    This appeared to be a DLL version issue and using Process Explorer from the Sysinternals website I was able to see that Microsoft.Crm.Webservices.dll was being loaded from an unusual location: c:\Windows\Microsoft.Net\assembly\GAC_MSIL, and the DLL there was old.  I renamed the Microsoft.Crm.Webservices folder there plus I removed all the Microsoft.crm.* files under C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\<ID>\<ID> to ensure no older cached DLL’s were being used.  After an iisreset the CRM UI now mostly loaded but in any of the grid panes we were getting a Generic SQL error.

    After we resolved the performance counter problem, we were getting a common generic SQL error that was resolved with the below steps:

    Generic SQL Error

    Using SQL Profiler I was able to determine that the error was related to a query that was being executed against the PrincipalObjectAccessReadSnapshot table in the CRM Org database, that query was trying to retrieve a column called ObjectTypeCodeName that did not exist in the table definition.  Researching in our internal knowledgebase I found another case with the same issue that included a script that fixes the problem by removing the references to the existence of this column in the table from our metadata, the script is:

                   delete from MetadataSchema.Attribute where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')

                   delete from AttributeIds where AttributeId in ('4456bbb5-0bad-4360-afca-74d099056116', 'c3dce60b-fd95-43b4-8d20-ea4bbcd5c436')

    Note that this script needs to be run against all CRM Org databases in the deployment, it should remove 4 rows in total.

    • Marked as answer by smfpride Wednesday, July 24, 2013 6:05 PM
    Wednesday, July 24, 2013 6:05 PM