473,946 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session state can only be used when EnableSessionSt ate 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 enableSessionSt ate 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 3280
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 enableSessionSt ate is set to true in all of them.
So did I. Did you also check machine.config in your
%WinDir%\Micros oft.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 enableSessionSt ate 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 enableSessionSt ate 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.P age.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
7019
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: Line 6: Dim sqlQry as string = "INSERT INTO logs (UID,Note,Description) VALUES " & Session.Contents("UID") & ", 'LOGOUT',''"
1
3644
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 determine its return information. After implementing this property, whenever I now open any aspx page in the Visual Studio 7.0 IDE, the following error shows up: "The file failed to load in the Web form designer. Please correct the
0
1244
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 data is written to the dictionary I redirect to another page and read the values. My Code:
6
16055
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 fnGetShoppingCartText() { if (Session != null) { ArrayList cart = (ArrayList)Session;
2
2099
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 "WebNotification". In the WebSite "App1" we create an instance of "WebNotification", but when this class tries to access some Session variables it generates the following error: Session state can only be used when enableSessionState is set to...
3
34488
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 Page and place the code in there. Then each webpage will inherit from my modified page class. This works fine, but if I try and access the Session from the modified page class, I get the following error: Session state can only be used when...
2
16838
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 in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModulessection in the application configuration." In my Web.config I put the...
10
4417
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 configuration file or in the page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModulessection in the application configuration. Here is my current...
4
2525
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...) Any reason why even though I did this I keep getting this error.... Server Error in '/abc' Application.
0
10151
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9977
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10684
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8245
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7412
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6106
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4933
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3533
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.