473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Session state can only be used when EnableSessionState is set to true... error

I migrated a Sharepoint Team Services website to a Sharepoint website
on Windows 2003. The site was working well on the old server.

After the migration any asp.net page that uses session variables no
longer works. I get the subject error.

The directory with the asp pages is NOT a managed path in Sharepoint.
The default page does not use Session State so opens fine. All the links
from that page use session state and none of them work.

I have searched every web.config file on the computer and made sure
that enableSessionState is set to true in all of them.

I found MS Knowledge Base Article - 828810 which realy is about
managed paths in sharepoint, but alludes that additional code may be
required in the virtual servers web.config file. I tried that code but it
returns an error saying that the <httphandlers> tag is not recognized.

I am at my wits end. I have been working to resolve this error for days
without success and without any useful help from anyone on the
internet. I thought I had already asked this question here, but cannot
find my post so I'm sorry if I am asking the same question again.

Can anyone, pleaes, shed some light on how to solve this problem.

Thanks,
John

PS: Feel free to email me directly.

Nov 18 '05 #1
6 3257
Hi,

I dont know share point but the error implies that you might put the
tags in a place that don’t match the *.config schema.

You should add the HttpHanlers under the existing <httpHandlers> (case
sensitive) located under <system.web> .tag.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
Hi,
I migrated a Sharepoint Team Services website to a Sharepoint website
on Windows 2003. The site was working well on the old server.
After the migration any asp.net page that uses session variables no
longer works. I get the subject error.
I am having the same problem on a Windows Server 2003 machine. When I read
your post I tried the site on my other machine which has WIndows XP. No
difference, same problem..
The directory with the asp pages is NOT a managed path in Sharepoint.
The default page does not use Session State so opens fine. All the links
from that page use session state and none of them work.
My site has nothing to do with SharePoint, it is plain ASP.NET. Manually
crafted though, I didn't use Visual Studio.
I have searched every web.config file on the computer and made sure
that enableSessionState is set to true in all of them.
So did I. Did you also check machine.config in your
%WinDir%\Microsoft.NET\CONFIG directory?
I found MS Knowledge Base Article - 828810 which realy is about
managed paths in sharepoint, but alludes that additional code may be
required in the virtual servers web.config file. I tried that code but it
returns an error saying that the <httphandlers> tag is not recognized.
That could be a case mismatch, the XML should be case sensitive.
I am at my wits end. I have been working to resolve this error for days
Well, for me it's only hobby. It still sucks.
Can anyone, pleaes, shed some light on how to solve this problem.


Does "you're not alone" make you feel any better?

Martin.
Nov 18 '05 #3
I was fooling myself on the Wndows XP part, I get another (security related)
problem on the Windows XP, not the enableSessionState problem.

So it may be Windows Server 2003 related after all.

Martin.
Nov 18 '05 #4
> I was fooling myself on the Wndows XP part, I get another (security
related)
problem on the Windows XP, not the enableSessionState problem.


No it's not. Just fixed the security probkem (needed write access to some
file), set debug to true and now I get the same error on the WIndows XP
machine.

Considering we find nothing on the net but the odd person that is having the
same problem it seems that it must be something we do to our machines. Now I
can't think of anything about my machines that is so special that it could
cause this. Then it may be the site. I will try and make a new, very basic
ASP.NET application, see how that responds.

Martin.
Nov 18 '05 #5
I found a workaround. For me the problem only occurs when I try to access
the
session object from the code-behind code. In-page session object
manipulation
works just fine.

I still don't see why the System.Web.UI.Page.Session object cannot be used
and I haven't found a way to enable it yet. I would like to know what's
happening.

Martin.
Nov 18 '05 #6
Hi,

read the last post in my blog :
"Behind the scenes of ASPX files"
http://weblogs.asp.net/ngur/archive/.../23/45487.aspx

it might help you to understand way ...
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Lozzi | last post by:
Error: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive at line 6 Line 4: <script RUNAT="SERVER"> Line 5: ...
1
by: Axel Dahmen | last post by:
Hi, I've added a property to my Page base class (this base class inherits from Page and all my aspx.cs classes inherit from my base class). This property of mine uses the Session object to...
0
by: Rick | last post by:
I am getting a "Session state can only be used when enableSessionState is set to true" error. it works on the first form where I am writing some data to a dictionary(Dictionarybase). After the...
6
by: KevinGravelle | last post by:
What is wrong with this picture? I'm trying to set my shopping cart text on my home page using the following function that is executed when the class is constructed: protected string...
2
by: ras26 | last post by:
I have a WebSite "App1" which has an external assembly "Lib1". Inside this external assembly we have developed some classes that derive from "System.Web.UI.Page". One of these pages is called...
3
by: Paul | last post by:
Hi All, In my application, I wished to check certain things on each page load, so rather than paste the same code in each pages constructor, I thought it would be more logical to inherit from...
2
by: fniles | last post by:
I am using Visual Studio 2005. In my ASPX page, when I try to use Session, I got the error "Session state can only be used when enableSessionState is set to true, either in a configuration file or...
10
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
I've been on this for a while, and cannot figure it out. Can someone please help with this message? SessionState can only be used when EnableSessionState is set to true, either in a...
4
by: Cirene | last post by:
In my web.config I added <pages enableSessionState="true">. In each of my pages I also added EnableSessionState="True" to the Page declaration. (I didn't think this was necessary, but...) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.