PDA

View Full Version : Report


slyon
11-11-2009, 10:53 AM
I am using a reportviewer control on an Aspx page like so:

Page------
<%@ Register
Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms"
TagPrefix="rsweb"
%>

<rsweb:ReportViewer
ID="rptEvent"
runat="server"
Width="98%"
ShowExportControls=False
height="11in"
visible=false
/>

Web.Config----------
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="120"
/>

Sometimes I get the following error and can not find out what is up. In some of the comments I see on-line list solutions that are not within my control dealing with IIS setup. I was wondering if anyone else was running into this and how can it be corrected? Thank you for any help!!


ASP.NET session has expired
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.AspNetSessionExpiredE xception: ASP.NET session has expired

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:

[AspNetSessionExpiredException: ASP.NET session has expired]
Microsoft.Reporting.WebForms.ReportDataOperation.. ctor() +614
Microsoft.Reporting.WebForms.HttpHandler.GetHandle r() +669
Microsoft.Reporting.WebForms.HttpHandler.ProcessRe quest(HttpContext context) +13
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75

wisemx
11-11-2009, 03:54 PM
Hi,
I'm guessing this is on IIS7.
To get this working you have to add a Handler mapping, which can be done via the IIS Manager or by hand like this:

<system.webServer>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" preCondition="integratedMode" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>

Notice that it goes below <system.webServer>
All the best,
Mark

slyon
11-12-2009, 12:00 PM
Mark;

Thank you for the reply!!

I don't think I have control over this part of the IIS environment. I have the page and the web.config file that I can change. Is this something developers can change when in a shared environment through DiscountAsp.net?

I want to stress the control only loses the session sometimes. When you reload the page it captures another session and is off and running again. It is enough to cause some concern.

wisemx
11-12-2009, 02:51 PM
...If you have access to the root web.config that is all you need for this.
If you need help let me know.
All the best,
Mark