Hi,
I have some strange problems using ReportViewer control with CRM - getting Execution ' ' cannot be found (rsExecutionNotFound)
Firstly i would like to say that Crm Server and Report Server are installed on separate servers.
In my App I retrieve data for the logged in user- was report is specified for the current user.
Then i set parameters for my ReportViewer control:
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ReportViewer1.ShowCredentialPrompts = true;
ReportViewer1.ShowExportControls = true;
ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerNetworkCredentials();
ReportViewer1.ServerReport.ReportServerUrl = new Uri(Properties.Settings.Default.ReportServerUrl);
ReportViewer1.ServerReport.ReportPath = Properties.Settings.Default.ReportServerPath + sysUser.new_dashboardreport.name;
[Serializable]
public sealed class ReportServerNetworkCredentials : IReportServerCredentials
{
ICredentials credentials;
#region IReportServerCredentials Members
public ReportServerNetworkCredentials(ICredentials cred)
{
credentials = cred;
}
public ReportServerNetworkCredentials()
{
}
public bool GetFormsCredentials(out Cookie authCookie, out string userName, out string password, out string authority)
{
authCookie = null;
userName = null;
password = null;
authority = null;
return false;
}
public WindowsIdentity ImpersonationUser
{
get
{
return null;
}
}
public ICredentials NetworkCredentials
{
get
{
if (credentials == null)
{
string userName ="admin";
string domainName = "domain";
string password = "123456";
return new System.Net.NetworkCredential(userName, password, domainName);
}
else
{
return credentials;
}
}
}
#endregion
}
ASPX code:
<form id="form1" runat="server">
<div>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote" Font-Names="Verdana" Font-Size="8pt" Width="98%" Height="670px" AsyncRendering="false">
<ServerReport />
</rsweb:ReportViewer>
</div>
</form>
When i try to run it from VS -works fine. When i've tried it on the test server ( CRM server and Report Server are installed on one server) - works fine.
When i try to run it on the production i see the Header of the ReportViewer control, after this "Generating report" -and after this i get:
===============================================================================================================================================
Server Error in '/' Application.
--------------------------------------------------------------------------------
Execution 'zuxie545topg1brxej3ptlet' cannot be found (rsExecutionNotFound)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.Reporting.WebForms.ReportServerException: Execution 'zuxie545topg1brxej3ptlet' cannot be found (rsExecutionNotFound)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ReportServerException: Execution 'zuxie545topg1brxej3ptlet' cannot be found (rsExecutionNotFound)]
Microsoft.Reporting.WebForms.ServerReport.InternalRenderStream(String format, String streamId, String deviceInfo, String& mimeType, String& encoding) +303
Microsoft.Reporting.WebForms.ServerReportControlSource.GetStreamImage(String streamID, String deviceInfo, String& mimeType) +62
Microsoft.Reporting.WebForms.ReportImageOperation.GetStreamImage(String streamID, HttpResponse response) +205
Microsoft.Reporting.WebForms.ReportImageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +103
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +326
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
===============================================================================================================================================
I have tried almost everything that people suggests in the net
1. have added ReportViewer.Reset () to Page_Load
2. run script to set the timout of the session to 6000
3. have added some unique number to the page- so that IE each time load new page
4. and so on...
only after i have added AsyncRendering="false" to the aspx page a finally can see some parts of the report. BUT:
a. when i try to chose somebody from the list of contacts and "View Report"=> Execution 'fgpwsqqt4eqaxjuabokkpcan' cannot be found (rsExecutionNotFound)
b. i also don't see most of the pictures and if i do: right click on the picture that is not shown => properties => get the url, put it in new browser window => http://<server>/Reserved.ReportViewerWebControl.axd?ReportSession=zuxie545topg1brxej3ptlet&ControlID=4843cae0a60b48d09e683d2218e8ddef&Culture=1033&UICulture=1033&ReportStack=1&OpType=ReportImage&StreamID=G_142iT2R0x0T1_1
=> get :
Server Error in '/' Application.
--------------------------------------------------------------------------------
Execution 'zuxie545topg1brxej3ptlet' cannot be found (rsExecutionNotFound)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.Reporting.WebForms.ReportServerException: Execution 'zuxie545topg1brxej3ptlet' cannot be found (rsExecutionNotFound)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Please, help :(