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

J

John Baughman

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.
 
N

Natty Gur

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
 
M

Martin

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.
 
M

Martin

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.
 
M

Martin

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.
 
M

Martin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top