LocalMode ReportViewer Export to Excel/PDF uses wrong session on server. Any Solutions?

I've built a very simple webforms local report using the ReportViewerControl application.
Not using SSRS. VS2005 (no SP1 installed)

It runs fine on my local machine, and it renders, and export to Excel and PDF work. After Deploying it to my web host, the export operations on the report toolbar fail with an Expired Session. Note that the report displays fine.

The export seems to fail because the session id string present in the URL during the export process is different than the one the report is rendered in. If I Cut/Paste the right session id into the "bad" URL, the report is exported and can be opened in Excel/Acrobat as I'd expect.

So.. Question is, what am I doing wrong (or what's causing) this different session ID to be used in the URL during export

For Example:

ie: The report renders fine here:
http://..../(S(f2ul4iedpog0b545qvolc545))/Path/Reports.aspx

Export to Excel calls the following URL (which uses a different "session id" ): http://.../(S(2hk2ec55okmxwn45pavagujq))/Reserved.ReportViewerWebControl.axd Mode=true
&ReportID=1d0697efc31a40de93dd3d3f7f14f55e
&ControlID=ec887377-250a-4393-a83c-c98da5b0979c
&Culture=1033
&UICulture=1033
&ReportStack=1
&OpType=Export
&FileName=Report1
&ContentDisposition=OnlyHtmlInline
&Format=Excel


I hope this was clear enough. I'm really stuck and have read everything I can find that looks relevant to the problem.

-Jeff


Answer this question

LocalMode ReportViewer Export to Excel/PDF uses wrong session on server. Any Solutions?

  • The MaiN MaN

    Ok...

    I think my answer is in my example above. By changing the ContentDisposition property to "AlwaysInline", I get all the right stuff happening.

    Don't know what OnlyHtmlInline is really doing, but it ain't doin' it right... :)

    -Jeff



  • LocalMode ReportViewer Export to Excel/PDF uses wrong session on server. Any Solutions?