Schlagwort-Archive: Debugging

Common errors on organization import

When you import organizations into an existing environment, there is the possibility that the import could fail. This post should help you to solve the most common issues.

With large organizations, the most likely problem is that the import process runs into a timeout when it updates the user mapping. Update Rollup 8 contains a fix for this problem which has to be enabled manually. See

Another common issue is that the import fails with the following error

ExecuteNonQuery requires an open and available Connection. The connection’s current state is closed.

This error is likely caused by an issue in the .NET 2 Framework. See this article of the EMEA CRM Support team for a description

Another cause of this issue are reports which could not be published to the report server by any reason. For example, reports which are spiced up with custom assemblies cannot be published without the referenced assemblies. The import will fail when it tries to publish such a report. In this case enable the tracing, which generates a trace file for the mmc-console. With help of this file you can identify the report which is making problems. To solve the issue, you can either delete it directly from the database (unsupported) or you delete it prior to the backup of the originating system. After the successful import, you can import the problematic report again.

See this thread in the CRM Deployment forum for further description

Howto: debug mailing errors

If you are sending emails from Dynamics CRM, there is the possibility that the process of sending the mails fails. This article should give you a short overview on existing articles, which are describing the debugging details.

In order to look whether there are pending or failed mails in your system, you can use following search. As you can see, it is based on the existing view ‚My pending E-mails‘. You simply have to remove the ‚Owner = current user‘ condition.

If the result of this search contains mails which are in pending state since ages or have failed to send, it’s debugging time again. If you are using the Outlook Client for sending the mail, then take a look at for a description on enabling the tracing.

The debugging on the E-Mail Router side is a little bit more complex, but it is explained in detail in this article

System.InvalidOperationException at crm logon

Today I had a service call with Microsoft CRM Support. After the import of an organization into a development system at a client, it stopped working. Trying to logon CRM via web client fails with error message:

System.InvalidOperationException: ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.

The solution of this problem was quite simple (after the reason was found). The application pool of the system had insufficient rights for the organization database.

To get the system up and running again you have to

  1. Identify the identity of the application pool
  2. Ensure the app pool idenity has a sql user assigned for the organization database
  3. Grant the app pool identity the right db_owner on the organization database
  4. Restart IIS

CRM log file locations

Every part of a Microsoft Dynamics CRM implementation produces some log output. In addition to the standard logging, you could enable tracing for nearly every CRM component for debugging purposes.

This post shows where you can find these log and trace files. For enabling the generation of trace files see Please keep in mind that although the article says that you can configure the folder in which the trace files are generated via TraceDirectory, the location is hard coded in the applications. You can set a value, but it will be ignored.

Outlook Client

  • Standard log files %APPDATA%\Microsoft\MSCRM\Logs
  • Autoupdate log files %APPDATA%\Microsoft\MSCRM\AutoUpdate
  • Trace files %APPDATA%\Microsoft\MSCRM\Traces

Note: Since Update Rollup 7, these paths are switched to the %LOCALAPPDATA% folder in order to have a smaller roaming profile.

E-Mail Router

Data Migration Manager

  • Trace files %APPDATA%\Microsoft\MSCRM\Traces

CRM Server

  • Trace files {Install dir of application}\Trace
  • Setup log files, Deployment Manager, … %APPDATA%\Microsoft\MSCRM\Logs

Event log
In addition to the log files, there is also useful information in the application event log. With the installation of CRM you get following new event sources

  • MSCRMCallout
  • MSCRMDeletionService
  • MSCRMDeployment
  • MSCRMEmail
  • MSCRMKeyArchiveManager
  • MSCRMKeyGenerator
  • MSCRMKeyService
  • MSCRMLocatorService
  • MSCRMPerfCounters
  • MSCRMPlatform
  • MSCRMReporting
  • MSCRMTracing
  • MSCRMWebService

Added note for Outlook Client log paths for version Rollup 7 or higher