locked
CRM 2011 Custom Reports Won't Work RRS feed

  • Question

  • I recently upgraded to CRM 2011 On-Premise, and am having issues running any reports that I create with the report wizard in the CRM.  I recently created a basic test report that will list all my active organizations. When I try to run this report, I am getting a scripting error.

     Line: 5

    Char: 84093

    Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near ' <html> Do you want to continue running scripts on this page?

    The rest of the window is completely messed up with overlapping text that I can't dechiper.

    All of the out-of-the-box reports will run fine. This only occurs when I create a new custom report using the report wizard.

    What is going on here!?

    Dave

     

    Wednesday, March 9, 2011 3:39 PM

Answers

  • Glad to know that, Dave. It may not have worked before either because you did not register the SPN for t he FQDN or there were conflicting SPN entries present.

    For the benefit of others, I am restating the solution and the symptoms:

    SYMPTOMS: Fetch based reports do not work with an SRS log error similar to:

    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect --->

    PROBLEM: This happens if the SPNs of the CRM web service is not set properly and SRS server is unable to get a Service Ticket from the Ticket Granting Server (TGS).

    SOLUTION: Register the following SPNs:

    setspn -a http/<CrmApplicationServerName> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/dev11crm00 OTTAWA\CRMAS)

    setspn -a http/<CrmApplicationServer FQDN> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    NOTE: If you have multiple CRM Application servers, you would need to do this for each server.

    Thanks


    Abhishek Agarwal MSFT
    • Marked as answer by Dave Maslen Monday, March 14, 2011 7:07 PM
    Monday, March 14, 2011 7:05 PM

All replies

  • I am little confused when you say you create a report using wizard which list all your active organization. On which entity did you try to create the report?

    Could you see your report server logs and look if any error was reported there. Also, you could mail the logs to me at kugarg_at_microsoft_dot_com

    To collect the correct logs, please follow the following steps:

    1) Restart your reportserver.

    2) Navigate to CRM->Report Grid

    3) Run the wizard report. If an error occurs, try running it 2-3 time (so that we can have error logs)

    4) Now collect the latest log file from the LogFile folder of report server installation directory.

     

    Also could you try to create a simple report on Account and see if any error was reported.

     

    Thanks

    Kunal

     

     

    Wednesday, March 9, 2011 5:10 PM
  • Sorry, when I say I created a report of all active organization, I meant "Accounts". We renamed to organizations. :) It is basically a list of all accounts where status = 'Active'.  So that should generate the logs you need.

    I'll go get the logs now, and email them over to you.

    Dave

    Wednesday, March 9, 2011 5:21 PM
  • Dave,

    Could you please confirm, if your CRM server is running under a "domain user" and Report service under "Network Service". Also do you have both the server on a different machine?

    If yes, could you follow the following steps:

    Go to Report Server machine and type the following command:

    setspn -A -U http/servername.domainname:port domainname\username

    Here:

    servername is the machine name where crm app server is installed

    domainname is your domain name

    port on which crm is running

    username is the account under which crm service is running.

     

    You might need to repeat this steps if crm server is installed on multibox

     

    HTH

    Kunal

     

    • Proposed as answer by Jim Glass Jr Thursday, March 10, 2011 5:29 PM
    Thursday, March 10, 2011 4:36 AM
  • Kunal,

    My security policy for the services running on the CRM 2011 server are set up as per the recommendations: http://technet.microsoft.com/en-us/library/gg554723.aspx. This is running on one server. Each of the 4 accounts requires Domain User membership, and that has been granted appropriately.

    My report server is running on a different server, and the SSRS services is running under the Local System account.

    I'm not sure which service needs to be referenced in your proposed solution (Async, App, Web, Sandbox)? You mention "the username is the account under which the crm service is running". There is more than one CRM service, and they are all running under different accounts as per the link I provided above.  

    Cheers,

    Dave

    Thursday, March 10, 2011 4:39 PM
  • Dave,

    It should be the account under which Application Service or CRM App Pool is running.

    Thanks


    Abhishek Agarwal MSFT
    • Proposed as answer by Jim Glass Jr Thursday, March 10, 2011 5:29 PM
    Thursday, March 10, 2011 5:00 PM
  • Ok, I ran this script for the applcation service account. A cmd window opened for a split second, not long enough for me to see what it did. However, nothing has changed, and I still have the same symptoms as before.

    Suggestions?

    Dave

    Thursday, March 10, 2011 6:20 PM
  • Hi Dave,

    After running the script. Could you follow the same steps as I mentioned above to get the logs and see if you have the same error again (Please look out for the latest logs :)).

    Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect

    I guess you just have one App Server box in your deployment. What command did you used to setspn on the report server box?

     

     

     

     

     

    Friday, March 11, 2011 5:33 AM
  • Kunal,

    I attached the logs below. 

    I am running just one App Server, and one database server (SQL Server 2008) with SSRS. I did a standard upgrade from 4.0 to CRM 2011. I didn't run any specific commands to setspn on the report server box. I simply removed the 4.0 data connector, and installed the 2011 version.

    Cheers,

    Dave

     

    <Header>
     <Product>Microsoft SQL Server Reporting Services Version 2007.0100.2531.00 ((Katmai_PCU_Main).090329-1045 )</Product>
     <Locale>English (United States)</Locale>
     <TimeZone>Eastern Standard Time</TimeZone>
     <Path>C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\Logfiles\ReportServerService__03_10_2011_13_34_11.log</Path>
     <SystemName>DEV11DB00</SystemName>
     <OSName>Microsoft Windows NT 6.1.7600</OSName>
     <OSVersion>6.1.7600</OSVersion>
     <ProcessID>5020</ProcessID>
    </Header>rshost!rshost!758!03/10/2011-13:34:11:: i INFO: CLR runtime is initialized.
    rshost!rshost!758!03/10/2011-13:34:11:: i INFO: Derived memory configuration based on physical memory as 2096696 KB
    appdomainmanager!DefaultDomain!12e8!03/10/2011-13:34:11:: i INFO: Entered managed ServiceMain in DefaultDomain.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException,Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Threading.ThreadAbortException,System.Web.UI.ViewStateException,System.OutOfMemoryException,System.Web.HttpException,System.IO.IOException,System.IO.FileLoadException' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing AuthenticationTypes to '5' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing EnableAuthPersistence to 'True' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing MemorySafetyMargin to '80' percent as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing MemoryThreshold to '90' percent as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
    library!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Initializing IsReportManagerEnabled to 'True' as specified in Configuration file.
    configmanager!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Using report server internal url http://localhost:80/ReportServer.
    configmanager!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Using report server external url http://DEV11DB00:80/ReportServer.
    configmanager!DefaultDomain!f8!03/10/2011-13:34:13:: i INFO: Using url root http://DEV11DB00:80/ReportServer.
    appdomainmanager!DefaultDomain!f8!03/10/2011-13:34:14:: i INFO: Appdomain:2 WindowsService_0 started.
    resourceutilities!WindowsService_0!f8!03/10/2011-13:34:14:: i INFO: Reporting Services starting SKU: Standard
    resourceutilities!WindowsService_0!f8!03/10/2011-13:34:14:: i INFO: Evaluation copy: 0 days left
    resourceutilities!WindowsService_0!f8!03/10/2011-13:34:14:: i INFO: Running on 1 physical processors, 1 logical processors
    library!WindowsService_0!d80!03/10/2011-13:34:14:: i INFO: Catalog SQL Server Edition = Standard
    crypto!WindowsService_0!d80!03/10/2011-13:34:14:: i INFO: Initializing crypto as user: NT AUTHORITY\SYSTEM
    rshost!rshost!8a4!03/10/2011-13:34:14:: i INFO: Registered url=http://+:80/ReportServer/, vdir=/ReportServer, pdir=C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer.
    rshost!rshost!8a4!03/10/2011-13:34:14:: i INFO: Currently registered url http://+:80/ReportServer/ on endpoint 2
    rshost!rshost!8a4!03/10/2011-13:34:14:: i INFO: Registered url=http://+:80/Reports/, vdir=/Reports, pdir=C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager.
    rshost!rshost!8a4!03/10/2011-13:34:14:: i INFO: Currently registered url http://+:80/Reports/ on endpoint 3
    rshost!rshost!8a4!03/10/2011-13:34:14:: i INFO: Endpoint 4 is disabled and no url is registered vdir=/ReportServer/ReportBuilder, pdir=C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\ReportBuilder.
    resourceutilities!DefaultDomain!f8!03/10/2011-13:34:14:: i INFO: Reporting Services starting SKU: Standard
    resourceutilities!DefaultDomain!f8!03/10/2011-13:34:14:: i INFO: Evaluation copy: 0 days left
    rshost!rshost!f8!03/10/2011-13:34:14:: i INFO: Derived memory configuration based on physical memory as 2096696 KB
    servicecontroller!DefaultDomain!8a4!03/10/2011-13:34:14:: i INFO: Total Physical memory: 2147016704
    crypto!WindowsService_0!d80!03/10/2011-13:34:14:: i INFO: Exporting public key
    rpcserver!DefaultDomain!1304!03/10/2011-13:34:14:: i INFO: Process monitoring started.
    crypto!WindowsService_0!d80!03/10/2011-13:34:14:: i INFO: Performing sku validation
    crypto!WindowsService_0!d80!03/10/2011-13:34:14:: i INFO: Importing existing encryption key
    dbpolling!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: EventPolling polling service started
    dbpolling!WindowsService_0!1358!03/10/2011-13:34:15:: i INFO: HeartbeatThread(EventPolling): heartbeat thread started.
    dbpolling!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: NotificationPolling polling service started
    dbpolling!WindowsService_0!c8c!03/10/2011-13:34:15:: i INFO: HeartbeatThread(NotificationPolling): heartbeat thread started.
    dbpolling!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: SchedulePolling polling service started
    dbpolling!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: UpgradePolling polling service started
    dbpolling!WindowsService_0!1218!03/10/2011-13:34:15:: i INFO: PollingMaintenance: Polling started
    runningjobs!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: Database Cleanup (NT Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
    runningjobs!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
    runningjobs!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
    runningjobs!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: Execution Log Entry Expiration timer enabled: Next Event: 44744 seconds. Cycle: 86400 seconds
    runningjobs!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: SQM timer timer enabled: Next Event: 48344 seconds. Cycle: 86400 seconds
    rpcserver!DefaultDomain!d80!03/10/2011-13:34:15:: i INFO: RPC Server started.
    servicecontroller!DefaultDomain!d80!03/10/2011-13:34:15:: i INFO: RPC Server started. Endpoint name ='ReportingServices$MSRS10.MSSQLSERVER'
    appdomainmanager!WindowsService_0!d80!03/10/2011-13:34:15:: i INFO: Appdomain:2 WindowsService_0 initialized.
    appdomainmanager!DefaultDomain!cd0!03/10/2011-13:34:31:: i INFO: Appdomain:3 ReportServer_MSSQLSERVER_0-1-129442556710919090 started.
    appdomainmanager!ReportServer_0-1!cd0!03/10/2011-13:34:33:: i INFO: RS authentication mode is 5; effective ASP.NET authentication mode is Windows. vdir=/ReportServer.
    appdomainmanager!DefaultDomain!cd0!03/10/2011-13:34:33:: i INFO: Appdomain:3 ReportServer_MSSQLSERVER_0-1-129442556710919090 initialized (#1).
    webserver!ReportServer_0-1!cd0!03/10/2011-13:35:01:: i INFO: Reporting Web Server started
    resourceutilities!ReportServer_0-1!cd0!03/10/2011-13:35:02:: i INFO: Reporting Services starting SKU: Standard
    resourceutilities!ReportServer_0-1!cd0!03/10/2011-13:35:02:: i INFO: Evaluation copy: 0 days left
    resourceutilities!ReportServer_0-1!cd0!03/10/2011-13:35:02:: i INFO: Running on 1 physical processors, 1 logical processors
    runningjobs!ReportServer_0-1!cd0!03/10/2011-13:35:02:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
    runningjobs!ReportServer_0-1!cd0!03/10/2011-13:35:02:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
    library!ReportServer_0-1!1230!03/10/2011-13:35:04:: i INFO: Catalog SQL Server Edition = Standard
    crypto!ReportServer_0-1!1230!03/10/2011-13:35:04:: i INFO: Initializing crypto as user: NT AUTHORITY\SYSTEM
    crypto!ReportServer_0-1!1230!03/10/2011-13:35:04:: i INFO: Exporting public key
    crypto!ReportServer_0-1!1230!03/10/2011-13:35:04:: i INFO: Performing sku validation
    crypto!ReportServer_0-1!1230!03/10/2011-13:35:04:: i INFO: Importing existing encryption key
    library!ReportServer_0-1!1230!03/10/2011-13:35:09:: i INFO: RenderForNewSession('/FCMDEV_MSCRM/CustomReports/{9EF1F1CC-434B-E011-B943-005056BC2CB4}')
    processing!ReportServer_0-1!1230!03/10/2011-13:35:26:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
     --- End of inner exception stack trace ---
     at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
     at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
     at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
     at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
     at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
     at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
     at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
     at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
     at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
     --- End of inner exception stack trace ---
    
    Server stack trace: 
     at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
     at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
     at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
     at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    
    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 System.ServiceModel.ICommunicationObject.Open()
     at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
     at Microsoft.Crm.Sandbox.Reporting.ReportServerSandboxSdkClient.Execute(SandboxSdkContext requestContext, String operation, Byte[] serializedRequest)
     at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.SandboxFetchProxy.Execute(OrganizationRequest request)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.SdkMetadataProvider.GetEntity(String name)
    
    Server stack trace: 
     at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
     at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
     at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
     at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    
    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 System.ServiceModel.ICommunicationObject.Open()
     at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
     at Microsoft.Crm.Sandbox.Reporting.ReportServerSandboxSdkClient.Execute(SandboxSdkContext requestContext, String operation, Byte[] serializedRequest)
     at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.SandboxFetchProxy.Execute(OrganizationRequest request)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.SdkMetadataProvider.GetEntity(String name)
     --- End of inner exception stack trace ---
     --- End of inner exception stack trace ---
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.SdkMetadataProvider.GetEntity(String name)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.MetadataHelper.GetEntity(String name)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.AttributeExpression.get_AttributeMetadata()
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.PropertyExpressionFactory.GetProperties(AttributeExpression attribute)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.MetadataBoundFieldExpression..ctor(AttributeExpression attribute)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.FetchProcessor.InitializeEntityFields(XmlNode entityNode, EntityExpression parentEntityExpression, IList`1 reportFieldNames)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.FetchProcessor.InitializeFields(XmlDocument fetchDocument)
     at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.FetchProcessor..ctor(String fetchXml, ICrmDataParameterCollection parameters, IMetadataHelper metadataHelper)
     at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.FetchDataExtensionCommand.<ExecuteReader>b__0()
     at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException[TResult](Func`1 body)
     at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.FetchDataExtensionCommand.ExecuteReader(CommandBehavior behavior)
     at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbCommand.ExecuteReader(CommandBehavior behavior)
     at Microsoft.Crm.Reporting.DataExtensionShim.Common.SrsExtCommand.ExecuteReader(CommandBehavior behavior)
     at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQuery()
     --- End of inner exception stack trace ---
    processing!ReportServer_0-1!1230!03/10/2011-13:35:26:: e ERROR: An exception has occurred in data source 'DSMain'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
    processing!ReportServer_0-1!1230!03/10/2011-13:35:26:: i INFO: DataPrefetch abort handler called for Report with ID=. Aborting data sources ...
    processing!ReportServer_0-1!1230!03/10/2011-13:35:26:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
     --- End of inner exception stack trace ---
    processing!ReportServer_0-1!1230!03/10/2011-13:35:26:: w WARN: Data source 'CRM': Report processing has been aborted.
    processing!ReportServer_0-1!1230!03/10/2011-13:35:26:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
     --- End of inner exception stack trace ---
    chunks!ReportServer_0-1!1230!03/10/2011-13:35:27:: w WARN: Rolling back shared chunk transaction for snapshot '9026e331-0267-437d-be5f-e2d2ace99424', Permanent=False.
    library!ReportServer_0-1!1230!03/10/2011-13:35:27:: w WARN: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
    webserver!ReportServer_0-1!1230!03/10/2011-13:35:27:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
    
    Friday, March 11, 2011 1:27 PM
  • Dave,

     

    In the above mail you mention that "I didn't run any specific commands to setspn on the report server box". On which machine did you run the below command?

    setspn -A -U http/servername.domainname:port domainname\username

     

    Also could you paste the final command that you execute, after replacing it with your machine, domain and user name.

     

    Thanks

    Kunal

     

     

    Friday, March 11, 2011 1:41 PM
  • Sorry for the confusion, I meant that I didn't run the setspn command at installation time.

    I ran it the other day based on your recommendation. I ran it on my database server (dev11db00) which is a Windows 2008 R2 server with SQL Server 2008 and SSRS:

    I ran the following: setspn -A -U http/dev11crm00.OTTAWA:80 OTTAWA\CRMAS

    dev11crm00 is my CRM server box (Windows 2008 R2).

    The CRMAS domain account has the following permissions: The last item in bold, I didn't do anything with at install time, so maybe that is the issue?

    Application Service (CRMAppPool IIS Application Pool identity)

    • Member of the Active Directory Domain Users group.
    • Member of the Active Directory Performance Log Users group.
    • Administrators local group membership on the computer where SQL Server is running.
    • Administrators local group membership on the computer where the Microsoft Dynamics CRM Web site is installed.
    • Folder read and write permission on the Trace and CRMWeb folders, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
    • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
    • CRM_WPG group membership. This group is used for IIS worker processes. The group is created and the membership is added during Microsoft Dynamics CRM Server Setup.
    • The service account may need an SPN for the URL used to access the Web site that is associated with it.

    Thanks,

    Dave

    Friday, March 11, 2011 1:49 PM
  • Hi Dave

    Since this has not resolve the problem for you, I would like you to start all over again following the steps described below:

    1. Remove the SPN that you registered on Kunal's recommendation.

    2. Check if CRM's web site is using Kernel-mode authentication. You can do so by going to the Authentication settings of the CRM's web site under IIS Manager. Under that, go to Windows Authentication's advanced settings and see if the "Enable Kernel-mode authentication" is checked.

    3. If Kernel-mode authentication is enabled, register the following SPNs:

    setspn -a http/dev11crm00

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> (E.g. setspn -a http/dev11crm00.OTTAWA.com) 

    4. If Kernel-mode authentication is not enabled, register the following SPNs:

    setspn -a http/dev11crm00 OTTAWA\CRMAS

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> OTTAWA\CRMAS (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    5. Validate that the SPNs are registered correctly using the command

    setspn -l OTTAWA\CRMAS

    Optionally, you may check that the service is not registered for any other UPN using querySPN.vbs as follows:

    cscript queryspn.vbs http/dev11crm00*

    6. Try running the report. If it does not work even after trying these steps, please share the results of the step # 5 above. We may also need to look at CRM and Network traces in that case.

    Appreciate your patience and efforts. Thanks


    Abhishek Agarwal MSFT
    Saturday, March 12, 2011 8:37 PM
  • Abhishek,

    Ok, I did as you suggested. First I unregistered the SPNs. Then I checked the CRM web site authentication settings, and Enable Kernel-mode authentication is checked off.

    I then attempted to register the SPNs you suggested:

    setspn -a http/dev11crm00

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> (E.g. setspn -a http/dev11crm00.OTTAWA.com) 

    However, both of these are missing the parameter "accountname".

    What do you suggest?

    Thanks,

    Dave

    Monday, March 14, 2011 1:21 PM
  • Hi Dave

    If I read it right, you said that you do not have Kernel-mode enabled. In that case, you should be using the account name as suggested in point# 4 by me.

    setspn -a http/dev11crm00 OTTAWA\CRMAS

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> OTTAWA\CRMAS (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    Did you do this or something else? Were you able to have the reports working after that?

    Thanks


    Abhishek Agarwal MSFT
    Monday, March 14, 2011 1:35 PM
  • Hi Abhishek,

    Actually, Kernel-mode authentication is enabled (the box is checked), so that is why I'm confused as to why the commands you indicated are not working.

    Specifically, you said:

    3. If Kernel-mode authentication is enabled, register the following SPNs:

    setspn -a http/dev11crm00

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> (E.g. setspn -a http/dev11crm00.OTTAWA.com) 

    I tried those commands, but am getting a "missing parameter accountname" error on each.

    Suggestions?

    Thanks,

    Dave

    Monday, March 14, 2011 2:07 PM
  • I am sorry for that. I was assuming it will work as per here. As it turns out, it doesn't.

    So you can try this out:

    setspn -a http/dev11crm00 OTTAWA\dev11crm00$

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> OTTAWA\dev11crm00$ (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\dev11crm00$)

    If this doesn't work (as I am not sure the article that I followed is trustworthy), you can try unregistering the above SPNs and registering the following:

    setspn -a http/dev11crm00 OTTAWA\CRMAS

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> OTTAWA\CRMAS (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    Ufortunately, SPNs are quite tricky and it is hard to get them working properly.

    Thanks


    Abhishek Agarwal MSFT
    Monday, March 14, 2011 4:34 PM
  • Abhishek,

    The second solution worked! Don't know why it didn't work the first time when Kunal suggested it, but for whatever reason, it worked when I re-registered both as follows:

    setspn -a http/dev11crm00 OTTAWA\CRMAS

    setspn -a http/dev11crm00.<Fully Qualified Domain Name> OTTAWA\CRMAS (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    Reports are now executing as expected.

    Thanks guys! Problem #1 is resolved now. :)

    Now on to my second problem involving BIDS 2008 SQL-based reports not running in CRM 2011. I'll post the relevant information in my other thread.

    Thanks again!

    Dave

    Monday, March 14, 2011 6:37 PM
  • Glad to know that, Dave. It may not have worked before either because you did not register the SPN for t he FQDN or there were conflicting SPN entries present.

    For the benefit of others, I am restating the solution and the symptoms:

    SYMPTOMS: Fetch based reports do not work with an SRS log error similar to:

    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect --->

    PROBLEM: This happens if the SPNs of the CRM web service is not set properly and SRS server is unable to get a Service Ticket from the Ticket Granting Server (TGS).

    SOLUTION: Register the following SPNs:

    setspn -a http/<CrmApplicationServerName> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/dev11crm00 OTTAWA\CRMAS)

    setspn -a http/<CrmApplicationServer FQDN> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    NOTE: If you have multiple CRM Application servers, you would need to do this for each server.

    Thanks


    Abhishek Agarwal MSFT
    • Marked as answer by Dave Maslen Monday, March 14, 2011 7:07 PM
    Monday, March 14, 2011 7:05 PM
  • Hi ABHISHEK,

    Thanks for your reply. It's really helpful but I am still not sure what is going wrong with my system.

    Here's what's happening;

    1. We are using the MS CRM Dynamics 2011 Online version.

    2. When one of the users is trying to generate a custom-made report he is facing the above mentioned error.

    3. After reading your reply I tried registering the SPNs on the CRM Web Server but it is not recognizing the command.

    4. When I use the same command on my local machine it does recognize the command (setspn).

    Now, here are my questions:

    1. Where are we supposed to run this command, on the client machine or the server?

    2. Does this error imply the same thing for the Online and the On-Premise version?

    3. Would it be possible for you to give me a overall picture of this process and where is it going wrong?

     

    I read a few articles on MSDN about SPNs and have only a vague idea about all of this. I would really appreciate it if you give me a better picture of this whole process. I am basically a CRM developer and pretty new to this field.

     

    Thanks,

    Bhaskar

    Thursday, April 28, 2011 7:43 PM
  • Hi Abhisek

    Viewing the document: rssetuptfd_v2.docx, available for download from below website:

    http://social.microsoft.com/Forums/en-HK/crmdeployment/thread/ec025168-9844-4ac4-b62e-3021d5ee54e7?prof=required),

    I noticed I am using - Configuration 4: Separate Servers (Reporting Services, Microsoft SQL Server, and Microsoft Dynamics CRM on separate servers). For Data Source I enabled - Prompted Credentials, Use as Windows credentials when connecting to the data source.

    When users run SQL Report from SSRS report manager, they are prompted to enter username and password for every report. They are only able to view the data or info from the CRM Business Unit that they belong to in CRM, so crm security is working ok for SQL Reports (SQL reports - inhouse custom developed SQL reports - not CRM reports). Although it works as expected, I would like to implement Windows Authentication since it would allow users to run SQL reports without having to enter their domain logon credentials every time. I know kerberos might be the fix as document (rssetuptfd_v2.docx) explains, but has anyone successfully implemented it with Configuration 4: Separate Servers.


    Monday, May 30, 2011 8:45 PM
  • Hi Abhishek

    I am having the same issue as above. I tried All the steps but it is still not working. we have two servers one CRMSERVER and the second is CRM-SQLSERVER

    belwo is the log information after I tried the solution and tried to run a custom report.

    processing!ReportServer_0-4!132c!06/07/2011-19:44:15:: e ERROR: An exception has occurred in data set 'DSMain'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
       --- End of inner exception stack trace ---
       at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
       at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
       at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
       at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
       at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
       at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
       at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
       at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
       at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
       --- End of inner exception stack trace ---

    Server stack trace:
       at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
       at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
       at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

    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 System.ServiceModel.ICommunicationObject.Open()
       at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
       at Microsoft.Crm.Sandbox.Reporting.ReportServerSandboxSdkClient.Execute(SandboxSdkContext requestContext, String operation, Byte[] serializedRequest)
       at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.SandboxFetchProxy.Execute(OrganizationRequest request)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.SdkMetadataProvider.GetEntity(String name)

    Server stack trace:
       at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
       at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
       at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
       at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
       at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

    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 System.ServiceModel.ICommunicationObject.Open()
       at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
       at Microsoft.Crm.Sandbox.Reporting.ReportServerSandboxSdkClient.Execute(SandboxSdkContext requestContext, String operation, Byte[] serializedRequest)
       at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.SandboxFetchProxy.Execute(OrganizationRequest request)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.SdkMetadataProvider.GetEntity(String name)
       --- End of inner exception stack trace ---
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.SdkMetadataProvider.GetEntity(String name)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.MetadataHelper.GetEntity(String name)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.AttributeExpression.get_AttributeMetadata()
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.PropertyExpressionFactory.GetProperties(AttributeExpression attribute)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.MetadataBoundFieldExpression..ctor(AttributeExpression attribute)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.FetchProcessor.InitializeEntityFields(XmlNode entityNode, EntityExpression parentEntityExpression, IList`1 reportFieldNames)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.FetchProcessor.InitializeFields(XmlDocument fetchDocument)
       at Microsoft.Crm.Reporting.DataExtension.Common.Fetch.Utility.FetchProcessor..ctor(String fetchXml, ICrmDataParameterCollection parameters, IMetadataHelper metadataHelper)
       at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.FetchDataExtensionCommand.<ExecuteReader>b__0()
       at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException[TResult](Func`1 body)
       at Microsoft.Crm.Reporting.DataExtension.Server.Fetch.FetchDataExtensionCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.Crm.Reporting.DataExtensionShim.Common.SrsExtCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
       --- End of inner exception stack trace ---
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQueryAndProcessAsIRowConsumer(Boolean processAsIRowConsumer)
       at Microsoft.ReportingServices.OnDemandProcessing.TablixProcessing.RuntimeOnDemandDataSet.Process()
       at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.ProcessConcurrent(Object threadSet)
    processing!ReportServer_0-4!132c!06/07/2011-19:44:15:: i INFO: DataPrefetch abort handler called for Report with ID=. Aborting data sources ...
    processing!ReportServer_0-4!132c!06/07/2011-19:44:15:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'DSMain'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
    Microsoft.Crm.CrmException: An unexpected error occurred.
    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: A call to SSPI failed, see inner exception. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: The target principal name is incorrect
       --- End of inner exception stack trace ---

    Tuesday, June 7, 2011 5:05 PM
  • Hi ,

     

    I also Followed the same, but no  successfull result.,

    Can any one point me to the right   direction?

     

    Thanks!


    Siva Polisetty http://dynamicscrm2011.wordpress.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
    Monday, July 4, 2011 5:07 AM
  • Glad to know that, Dave. It may not have worked before either because you did not register the SPN for t he FQDN or there were conflicting SPN entries present.

    For the benefit of others, I am restating the solution and the symptoms:

    SYMPTOMS: Fetch based reports do not work with an SRS log error similar to:

    System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
    System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
    System.ComponentModel.Win32Exception: The target principal name is incorrect --->

    PROBLEM: This happens if the SPNs of the CRM web service is not set properly and SRS server is unable to get a Service Ticket from the Ticket Granting Server (TGS).

    SOLUTION: Register the following SPNs:

    setspn -a http/<CrmApplicationServerName> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/dev11crm00 OTTAWA\CRMAS)

    setspn -a http/<CrmApplicationServer FQDN> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/dev11crm00.OTTAWA.com OTTAWA\CRMAS)

    NOTE: If you have multiple CRM Application servers, you would need to do this for each server.

    Thanks


    Abhishek Agarwal MSFT

    While adding the SPN's fixes the FetchXML report problem it causes another problem for us.

    After adding the SPN's to the app pool domain service account we can no longer connect to CRM 2011 using the NetBIOS name or FQDN of the server.

    Only connecting by IP address will work.

    When connecting by name the user is prompted for credentials, and gets a 401 error after three attempts - even when correct credentials are entered.

    The following error is logged on the client computer:

    The kerberos client received a KRB_AP_ERR_MODIFIED error from the server XXXXX$.  This indicates that the password used to encrypt the kerberos service ticket is different than that on the target server. Commonly, this is due to identically named  machine accounts in the target realm (XXXXX), and the client realm.   Please contact your system administrator.

    Removing the SPN's fixes the connection problem; but then reports don't work.

    Changing the CRM app pool to run as Network Service fixes both problems; but is not ideal (does not meet corporate standards).

    The AD domain is at Windows 2003 functional level (running on Windows 2003 servers) if that makes a difference.

     

    Monday, July 18, 2011 3:03 AM
  • p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; background-color: #f5f5f5} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; color: #ff3d3a; background-color: #f5f5f5} span.s1 {color: #000000}

    When adding SPN's, two more things has to be done: 

     

    1. Open the ApplicationHost.config file in a text editor. By default, this file is 

    located at %windir%\system32\inetsrv\config\ (crm server).

    For all folders under the Default Web Site location path, set the value of the 

    WindowsAuthentication element and the useAppPoolCredentials attribute to true. 

    For example:

     <system.webServer>

       <security>

          <authentication>

             <windowsAuthentication enabled="true" useAppPoolCredentials="true" />

          </authentication>

       </security>

    </system.webServer>

    Try run any of customized reports again, they should work like other any our-of-box 

    reports.

     

    2. Run iisreset


    Siri
    Thursday, August 18, 2011 1:20 PM
  • Hi All,

    I could able to resolve this issue, by setting the SPN to reportserver  also.

    Thanks!


    Siva Polisetty http://dynamicscrm2011.wordpress.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
    Tuesday, August 23, 2011 12:57 AM
  • Phil,

    Did you ever find the answer to your problem?

    I have the exact same problem, as soon as I add a SPN fro the CrmAppService account the FetchXml Reports start working however users are unable to connect to the CRM web server anymore as they always get 401 errors.

     

    Sunday, August 28, 2011 12:57 AM
  • SydWaters,

    Had the same problem after adding SPN (reports work, logging into CRM did not) and used SiriHarpers solutions above (not exactly, but close) and it worked. This is how I did it.

    1. On CRM-server, open ApplicationHost.config in %windir%\system32\inetsrv\config\ with Notepad.

    2. Search for "useKernelMode" and you should find only one row looking like this: <windowsAuthentication enabled="true" useKernelMode="true">

    3. Add useAppPoolCredentials="true" so the row now looks like this: <windowsAuthentication enabled="true" useKernelMode="true" useAppPoolCredentials="true">

    4. Save the file and restart IIS with iisreset.

    That worked for me.

    Could also point out that I have no idea what this means security wise, so it's on your own risk, but it worked for me.

    Thursday, September 1, 2011 10:53 AM
  • This worked for me, but in my case, I needed the '-u' option before the user account running CRM like this:

     

    setspn -a http/dev11crm00 -u OTTAWA\CRMAS
    setspn -a http/dev11crm00.OTTAWA.com -u OTTAWA\CRMAS

    Wednesday, September 14, 2011 2:05 PM
  • In case anyone is seeing this when using a SQL query as a dataset, check and make sure you are using the correct 'Filtered' views.  I had the same problem but traced it to having select from Account rather then FilteredAccount
    Thursday, October 20, 2011 4:09 PM
  • I am having the same problem as the original user, and I've tried everything I've seen on this thread.  The strange thing in my case (strange to me anyway) is that it seems like some of the custom reports are working and some are not.  For the one that fail, I get the "target principal name is incorrect" error in the SSRS log.

    So far, I've tried the following:

    1. Enabled RDLSandboxing (http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/5f4363fa-2c87-48d5-a442-65beeef310c2)

    2. Ran the setspn command described in this thread (it reported success)

    3. Added useAppPoolCredentials="true" to my applicationHost.config file on the CRM server where ever I saw windowsAuthentication enabled="true" and did an iisreset

    The CRM instance was upgraded from CRM 4.0 

    One thing I noticed is that in our list of reports, old reports (that existed prior to the upgrade to 2011) that have a modified name of "SYSTEM" all seem to be failing.  Old reports that have an actual user as the modified name seem to be the ones that work.  However, when those same users attempt to create new custom reports they also fail to execute.

    I've verified that reports that fail and reports that run are located in the same folder on the SSRS site, and are using the same data source.  

    Any help would be greatly appreciated; thanks in advance!

    **EDIT** A consultant solved this by doing the SETSPN thing again; not sure why it worked the second time and not the first, but it seems to have worked.  

     

     


    Craig
    • Edited by cphite Saturday, January 28, 2012 2:25 AM
    Thursday, January 26, 2012 4:30 PM
  • Hi everyone,
     
    In Microsoft Dynamics CRM 2011(online), we face the same issue. (Embedded report doesnt work in custom web page)
     
    We have a report whose sql query shows data related to crm users'credential and what we want is that the toolbar of the related report shouldnt be shown therefore we developed a custom aspx page. In reportviewer the report works successfully. If we try to add that report to the dashboard, it requires Login Name and Password that prevents to view this report.
     
    How can we solve this issue?
    Saturday, June 23, 2012 4:12 PM
  • For us it was happening on CRM online 2011, the same error. However in our case the user (or the security role) did not have permission to one of the entities that the report was trying to pull.
    Wednesday, September 11, 2013 5:23 PM