My Techie Blog

  Home  |   Contact  |   Syndication    |   Login
  110 Posts | 5 Stories | 406 Comments | 0 Trackbacks

News

Article Categories

Archives

ADO.NET

Ajax

API/WebServices

ASP.NET Resources

BizTalk Server

Blogs I read

Free Books

How to

iOT

JavaScript

JQuery

JSLink - SharePoint

JSON

LINQ

Misc

Mobile BI

MS Business Inteliigence

Reporting Services

Responsive/MVC ASP.NET

SEO

Sharepoint Resources/Tools

SharePoint 2010 Branding

SharePoint 2010 Videos

SharePoint 2013

SharePoint Online

SilverLight

SPServices

SQL Server

Sql Server 2012

SSIS

Web Optimization Tools

Web Performace Tools

Windows 8

Windows Azure

Windows Azure

Windows Phone

WorkFlows

WSS V3

xml

While i was trying to setup some reports on a SPF 2010 site.
After trying to add a Sql Reporting Webpart i get the error:

Session state has been disabled for ASP.NET.
The Report Viewer control requires that session state be enabled in local mode

I never came across that error before when using RSWebaprts in Sharepoint 2007:)
But i think is related to ASP.NET sessions state:(
Any to fix it you would have to start to make sure the SharePoint Server ASP.NET Session State Service is enabled.


Unfortunately in Sharepiint SPF2010 and SP 2010 you would have to do it using PowerShell
By doing :  Enable-SPSessionStateService -Defaultprovision

PS C:\> PSSnapin - Shows you all the PS Snapins
PS C:\> Add-PSSnapin "Microsoft.SharePoint.PowerShell" -- Adds the Sharepoint PS Snapin
PS C:\> get-command -Noun SP* -- Show all SP cmdlets
PS C:\> Add-SPShellAdmin -- (If you get error regarding the access to the farm you use this command to add an acct to able to run the Shell admin)
PS C:\> Get-Help Enable-SPSessionStateService - Shows helpp for  Enable-SPSessionStateService
PS C:\> Enable-SPSessionStateService -Defaultprovision - (enables/activates SPSessionStateService) you have more options available when you run the Get-Help Enable-SPSessionStateService 
 

The Enable-SPSessionStateService cmdlet creates a session state database, installs the ASP.NET session state schema, and updates the Web.config files on the farm to turn on the session state service.

If the DefaultProvision form of the command is used, all default settings are used. These are:

  • DatabaseName = “SessionStateService_<GUID>”
  • DatabaseServer = the same database server as the SharePoint 2010 configuration database
  • DatabaseCredentials = Integrated Windows Authentication

After running the cmd you should see the SharePoint Server ASP.NET Session State Service started in your service applications in the Central Admin Site.
And of course be able to add your RS webparts

Enjoy

posted on Monday, June 14, 2010 11:28 PM

Feedback

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 7/8/2010 11:35 AM CptBongue
Worked like a charm. Thanks for posting!

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 9/23/2010 12:15 AM Shawn
Thanks for the article -- I'm getting an error when I "Create database permission denied " I assume that I need to "add-spshelladmin" at this point. However, I'm getting an error "You have to have Machine administrator priviliges" I'm currently a Domain and Local admin on that server? Any advice?

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 10/1/2010 5:45 AM Balu Palanisamy
@Shawn: I also had the same problem. It worked when I opened powersheel using "run as administrator"

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 10/27/2010 5:52 AM Zullu
I am not able to see the Snapin "Microsoft.SharePoint.PowerShell" in step 1, even when I run PS as an Administrator.
Thanks.
Zullu

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 10/27/2010 11:18 AM Patrick
Zullu, If you are running SP 2010 you should have Powershell installed by default.Check you assemblies folder and see if you have it there.

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 10/27/2010 11:55 PM patrick
does not work in foundation since the cmdlet does not exist, Can I somehow copy the cmdlet from the sharepoint 2010 version`?


# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 10/28/2010 1:34 AM Zullu
Patrick, Thanks for the reply.
As I said, I can run PowerShell (both cmd prompt as well as the ISE) in Administrator mode.
What I don't see is, when I run the command in step 1 (PS C:\> PSSnapin ) the "Microsoft.SharePoint.PowerShell" is missing from the list.
Here is what I see:
++++++++++++++++++++++++++++++
PS C:\Windows\system32> PSSnapin

Name : Microsoft.PowerShell.Diagnostics
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains Windows Eventing and Performance Counter cmdlets.

Name : Microsoft.WSMan.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Get-WSManInstance and Set-WSManInstance) that a
re used by the Windows PowerShell host to manage WSMan operations.

Name : Microsoft.PowerShell.Core
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.

Name : Microsoft.PowerShell.Utility
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains utility Cmdlets used to manipulate data.

Name : Microsoft.PowerShell.Host
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Start-Transcript and Stop-Transcript) that are
provided for use with the Windows PowerShell console host.

Name : Microsoft.PowerShell.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains management cmdlets used to manage Windows components.

Name : Microsoft.PowerShell.Security
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets to manage Windows PowerShell security.

++++++++++++++++++++++++++++++

Now with this, how do I add the assembly in step 2 ?
PS C:\> Add-PSSnapin "Microsoft.SharePoint.PowerShell"

I am running SP 2010 Standard Edition and assume that this should contain the assembly.
Thanks.
Zullu

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 8/24/2011 3:31 AM Simon Wilson
Superb instructions, saved my butt!!

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 7/7/2012 1:47 AM John Coltrane
Excellent post. Resolved the issue.

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 3/11/2013 5:38 PM Khalid
Great, resolved my issue in seconds

THank you

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 3/26/2013 8:29 PM Ravin Singh
I have run the cmd "Enable-SPSessionStateService -Defaultprovision" it's work thank you

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 7/12/2013 8:27 AM Marc
Nice fix, thanks.

Other than the creation of a new DB, I would like to know if there are other concerns: resources, performance, or any compatibility issues, since this is not set by default.

# re: Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode 2/7/2014 1:28 AM Alexander
Hello, I also tried the command in foundation 2010 and it does not work, not with run as admin, nothing. also checked in my medium and in my clients medium with same results. command does not exist .
any ideas ?

Post A Comment
Title:
Name:
Email:
Comment:
Verification: