Click here to Skip to main content
15,848,393 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I am using Report Viewer control in web application.[ReportViewer version 11].The applications sessionstate mode is set to InProc as follows
<sessionState mode="InProc" cookieless="false" timeout="20" /> [I cannot change the sessionstate mode and cookiless properties]
The report viewer is running with multiple worker process. I have implemented IReportServerConnection interface. I am passing username, password, domain name and server url via web config file to IReportServerConnection interface.
When I click on a button and try to connect to the SSRS report server to fetch data, I get ASP.Net session has expired or could not be found error message on reportviewer control.

Web.config file entries are as below.
  <add assembly="Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
  <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
     <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Please help out as soon as possible.

Thank You in advance.

Rajkumar Vishwakarma
Updated 17-Jun-22 5:23am

You cannot use sessionState mode="InProc" if you use more than one Worker Process because every worker process would keep track on their own set of sessions.

Either use only one worker process or change sessionState mode to use either a stateservice or a database.
Share this answer
Member 9903636 16-Jan-14 22:16pm    
where we should have Worker process ?
If it's in IIS than we have 1 and it's running in SSL(Load balancing).

Jörgen Andersson 17-Jan-14 2:39am    
If you are using more than one server you are also effectively using more than one worker process, and then you cannot use sessionState mode="InProc".
One way to fix the problem is to start the "ASP.NET State Service" on ONE of the servers and point all servers to use that servers StateService.
Member 9903636 17-Jan-14 2:46am    
i cannot change sessionState mode because my whole application is running on that and this issue even in local development server also.

My application working fine, only in reportviewer i m getting this issue.

Jörgen Andersson 17-Jan-14 2:49am    
Then you will HAVE to use only one workerprocess, and of course only ONE server.
Member 9903636 17-Jan-14 2:53am    
i m using 1 workerprocess in IIS and for local development i have only 1 server
Adding KeepSessionAlive="false" in ReportsViewer control fixes this issue.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900