ASP.NET Session Expired, Report Viewer Control

P

Praveen

I have spent some time researching this error and have tried all possible
ways present out there but could not get it to work, so though of asking it
to the smarter people. Here it goes...

I have a ASP.net web application that programmatically creates and
instantiates a report viewer control to show a report stored in SharePoint
(the goal is to eventually move this code to a SharePoint Web Part). Report
server is installed in SharePoint integrated mode. The report work great
when opened from SharePoint. But when I run in an ASP.NET control (using the
code shown below) the report seem to have some problem rendering data. it
shows data sometime and sometime shows blank row. In the event log I see an
ASP.NET exception saying the ASP.NET session expired. The attached email has
the exception.

here is the code that i am trying:
ReportView = new ReportViewer();
ReportView.ID = "ReportViewer";
ReportView.EnableViewState = true;
ReportView.ProcessingMode =
Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportView.AsyncRendering = false;
ReportView.SizeToReportContent = true;

ReportViewerCredentials rvwCreds = new
ReportViewerCredentials(ConfigurationSettings.AppSettings["username"],
ConfigurationSettings.AppSettings["pwd"], "US");
ReportView.ServerReport.ReportServerCredentials = rvwCreds;

// ReportView.ServerReport.Refresh();
ServerReport serverReport = ReportView.ServerReport;

// Set the report server URL and report path
serverReport.ReportServerUrl = new
Uri(ConfigurationSettings.AppSettings[Resource.ReportingServerURL].ToString());
serverReport.ReportPath =
ConfigurationSettings.AppSettings[Resource.MyReport].ToString();
this.form1.Controls.Add(ReportView);


Exception
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 5/25/2010 1:14:34 PM
Event time (UTC): 5/25/2010 6:14:34 PM
Event ID: 4414d36b7a3745bd931259ee0be6d90e
Event sequence: 4
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-129192848729442704
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\testSite\
Machine name: SPTSTLC02

Process information:
Process ID: 4588
Process name: w3wp.exe
Account name: MYDOMAINACCOUNT

Request path: /Reserved.ReportViewerWebControl.axd
User host address: X.X.X.X.X
User: MYDOMAINACCOUNT
Is authenticated: True
Authentication Type: Negotiate
Thread account name: MYDOMAINACCOUNT

Thread information:
Thread ID: 3
Thread account name: MYDOMAINACCOUNT
Is impersonating: True
Stack trace: at
Microsoft.Reporting.WebForms.ReportDataOperation..ctor()
at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String
operationType)
at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext
context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Exception information:
Exception type: AspNetSessionExpiredException
Exception message: ASP.NET session has expired

Environment:
Win2008,
MOSS2007,
SQL Server 2008
MSRS 2008 in SharePoint Integrated Mode
Report Viewer 2008 Redistributable with SP1
ASP.NET 2.0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top