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

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.
XML
<assemblies>
  <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
   </assemblies>
<httpHandlers>
  <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
<handlers>
     <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>


Please help out as soon as possible.

Thank You in advance.

Regards,
Rajkumar Vishwakarma
Posted
Updated 17-Jun-22 5:23am
v2

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
 
Comments
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).

Regards,
Rajkumar
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.


Regards,
Rajkumar
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