ASP.NET Session Expired, Report Viewer Control

Discussion in 'ASP .Net Web Controls' started by Praveen, May 27, 2010.

  1. Praveen

    Praveen Guest

    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
    Praveen, May 27, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mrwoopey
    Replies:
    6
    Views:
    5,219
    Ron Fluegge
    Apr 29, 2004
  2. =?Utf-8?B?SmFpZ2FuZXNo?=

    Reading report content using Crystal Report Viewer XI

    =?Utf-8?B?SmFpZ2FuZXNo?=, Jan 4, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,175
    =?Utf-8?B?SmFpZ2FuZXNo?=
    Jan 4, 2006
  3. jobs
    Replies:
    0
    Views:
    512
  4. Comfort
    Replies:
    0
    Views:
    545
    Comfort
    Oct 18, 2004
  5. JimC
    Replies:
    0
    Views:
    332
Loading...

Share This Page