Troubleshooting CRM Data Connector

The background:

So, I was called in to troubleshoot a CRM Reporting issue a client had, they had CRM Server front end, SQL Server 2008 + SSRS on the backend server – simple setup.

First thing first, CRM Data Connector is just another name (the real name) for Microsoft Dynamics CRM 4.0 Connector for SQL Reporting Services.

A quick revision and the purpose of the Data Connector

From Barry Givens’ post:

  1. Reports in CRM 4.0 are running out of this thing called “SQL Reporting Services Report Viewer” which is plainly an ASP.Net control that runs on the CRM 4.0 Web server. So when users view reports in CRM 4.0, they are hitting up a URL on the CRM 4.0 Web Server.
  2. Because of this, CRM 4.0 reports are always run in a delegated mode, the CRM and SSRS integration has to handle security. This requires us to use integrated authentication and configure trust for delegation between the CRM server, the SSRS server and the SQL server with the CRM database. [Refer to HOW TO: Configure Kerberos authentication for Microsoft CRM 3.0 and Microsoft SQL Server Reporting Services and Microsoft CRM 3.0: Additional Setup Tasks Required if Reporting Services Is Installed on Different Server.]
  3. MSFT decided to make our life less miserable by shipping this Data Connector with CRM 4.0. It is essentially an SSRS Data Processing Extension and handles all of the delegation for us so that we no longer have to fiddle around Kerberos etc, which wasn’t an option in version 3.0.

Right, back to our problem at hand;

The symptoms:

1. When users try to run a SSRS report via CRM Web App, they get a 401.

[{date time}] Process: w3wp |Organization:{Org Guid}
|Thread: 5
|Category: Application
|User: 00000000-0000-0000-0000-000000000000
|Level: Error
| ErrorInformation.LogError
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Error Number: 0x80040494
Error Message: The request failed with HTTP status 401: Unauthorized.
Error Details: The request failed with HTTP status 401: Unauthorized.
Source File: Not available
Line Number: Not available
Request URL: http://{IPAddress}:5555/{OrgName}/CRMReports/rsviewer/reportviewer.aspx
Stack Trace Info: [WebException: The request failed with HTTP status 401: Unauthorized.]
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods()
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname)
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters)
at Microsoft.Crm.Web.Reporting.SrsReportViewer.ConfigurePage()
[CrmReportingException: The request failed with HTTP status 401: Unauthorized.]
at Microsoft.Crm.Web.Reporting.SrsReportViewer.ConfigurePage()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.{OrgName}_crmreports_rsviewer_reportviewer_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

2. However, users can directly run the reports via report server URL.

3. When user click on the Preview arrow to the left of each report, like the one shown below;

image

They are greeted with the following error message;

“Reports cannot be run because the Connector for Microsoft SQL Server Reporting Services, a required component for reporting, is not installed on the server that is running Microsoft SQL Server Reporting Services.”

image

4. This is accompanied by the following error message in the CRM Web trace;

[{Date & Time}] Process: w3wp
|Organization:{Org Guid}
|Thread: 6
|Category: Application
|User: 00000000-0000-0000-0000-000000000000
|Level: Error
| ErrorInformation.LogError
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Error Number: 0x80040492
Error Message: MSCRM Data Connector Not Installed
Error Details: MSCRM Data Connector Not Installed
Source File: Not available
Line Number: Not available
Request URL: http://{IPAddress}:5555/{OrgName}/_grid/preview.aspx?type=9100&id={Report Guid}
Stack Trace Info: [CrmException: MSCRM Data Connector Not Installed]
at Microsoft.Crm.ObjectModel.ReportService.GetReportServer(ExecutionContext context, Boolean verifyAndConfigDataConnector)
at Microsoft.Crm.ObjectModel.ReportService.ListSnapshots(Guid reportId, ExecutionContext context, String[]& HistoryIds, DateTime[]& CreatedDates)
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
at Microsoft.Crm.Application.Utility.Util.RaiseXMLError(Exception exception)
at Microsoft.Crm.Application.Pages.Grids.PreviewPage.ConfigurePage()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.{OrgName}__grid_preview_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Diagnosis and resolution:

The fact that users are able to browse to the reports via report server and getting a 401 via CRM Web application, suggests the Data Connector is playing up. The second error message about Data Connector confirms this assumption. So we decided to reinstall Data Connector. The steps we did this in are the following;

1. Uninstall Data Connector from Add and Remove Programs.

2. Reinstall Data Connector from command line and the following configuration file.

3. Restart SSRS.

4. Recycle CRM AppPool or IISRESET.

5. Verify it works by firing up new IE and run up the reports.

6. Ask for your managers for a pay rise.

IMPORTANT points to remember when installing CRM Data Connector:

  1. Data Connector must be installed on the same server as the SQL Server Reporting Services instance that your CRM Server is using!
  2. If CRM is using a SQL Server 2008 backend, we must download an installer update file (.msp) from this KB article [How to obtain the setup updates for Microsoft Dynamics CRM 4.0] and install it via command line and a XML configuration file. (Refer to page 97 of the Install Guide for details.)
  3. If there are more than more SQL Server Reporting Services instances on the same server, the Reporting Server Uri and the instance name must be specified in the configuration file. (Like the one shown below.)
  4. Always remember to restart SSRS and IISRESET the CRM Web application before verify this has worked.

<crmsetup>
<srsdataconnector>
<configdbserver></configdbserver>
<autoupdateconfigdb>1</autoupdateconfigdb>
<reportserverurl>http://servername/reportserver_SSRS2008</reportserverurl>
<autogroupmanagementoff>0</autogroupmanagementoff>
<instancename>SSRS2008</instancename>
<configsku>OnPremise</configsku>
<!-- Set enabled = true for DB webstore integration.  Set configdb="true" for config db webstore integration-->
<webstore enabled="false" configdb="false" />
<monitoring>
<!-- Monitoring service account name and password. It can not be local system or network service account -->
<serviceaccountname></serviceaccountname>
<serviceaccountpassword></serviceaccountpassword>
</monitoring>
</srsdataconnector>
</crmsetup>

There you go, happy CRM’in 🙂

8 responses to this post.

  1. Thanks for the post. I was finally able to get my reports working using this method. What do you know, its the same thing I was already doing, but worked after like the 3rd try. Who would have thought?

    Reply

  2. Posted by Paul on June 5, 2010 at 9:32 am

    Thanks for your help with this! Based on about six different websites (including this one) and a ton of trial and error I was able to get it to work. I basically uninstalled the CRM SSRS Data connector and then installed it again, choosing to check for updated files first. It installed the Visual C++ runtime and then finished the installation of the product. I did an IISRESET and restarted the SSRS service as per your recommendation and then changed the report data source to be the new Microsoft CRM Data Extension (was just MSCRM).

    Thanks again!

    My research included these links:
    http://support.microsoft.com/kb/946289
    http://www.microsoft.com/downloads/details.aspx?FamilyId=D09CF5C4-FEC4-4322-9FEE-06A43401CF0C&displaylang=en
    http://www.crowehorwath.com/cs/blogs/crm/archive/2008/07/16/errors-running-crm-4-0-reports-post-installation-or-upgrade-even-after-installing-microsoft-crm-data-connector.aspx

    Troubleshooting CRM Data Connector


    http://support.microsoft.com/kb/948917/
    http://www.microsoft.com/downloads/details.aspx?FamilyID=1ceb5e01-de9f-48c0-8ce2-51633ebf4714&displaylang=en

    Reply

  3. Will I get paid for overtime? Modele Pussy
    %)))

    Reply

  4. Do you like it here? Young Model Blue
    78236

    Reply

  5. What’s the last date I can post this to to arrive in time for Christmas? http://yypidugenur.de.tl russian pics bbs Aw, I was hoping she’d get a surprise visit to her ass. I got my hopes up. I hate porn actresses who think they’re above anal.

    Reply

  6. I read a lot http://ucuryuhaob.de.tl little nymphet movie I had seen this on xtube before. The info on it there stated that at least a couple of the guys were virgins. Look at it this way, she is doing the workd a service by sacrificing herself for the betterment of all mankind.

    Reply

  7. Amazing! This blog looks exactly like my old one!
    It’s on a entirely different subject but it has pretty much the same page layout and design. Superb choice of colors!

    Reply

Leave a reply to Pckpujvc Cancel reply