In remote mode, the Report Viewer control requires session state be enabled or Report Server connection information specified in the config file.

When I tried to use a Report Viewer Control within a SharePoint Visual Web Part, I got the following error !

In remote mode, the Report Viewer control requires session state be enabled
 or Report Server connection information specified in the config file.

ReportViwer

Cause:

Session state has not been configured properly within SharePoint web.config.

Solution :

  • Edit Web.Config of your SharePoint Web Application that located in
    •  C:\inetpub\wwwroot\wss\VirtualDirectories\PortNum
  • Search for enableSessionState > Set it to True.
<pages enableSessionState="true" enableViewState="true" 
enableViewStateMac="true" validateRequest="false" 
pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter,
 Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">
  • Make sure that the following entry within <Modules> Tag
<modules runAllManagedModulesForAllRequests="true">
<remove name="Session" />
<add name="Session" type="System.Web.SessionState.SessionStateModule" 
preCondition="" />
</modules>
  • Make sure that the following  entry within <httpModules> Tag
<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule" />
</httpModules>
  • After the <httpModules> Tag ,add this entry
<sessionState mode="InProc" cookieless="false" timeout="20"/>

Enjoy 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s