473,832 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

EnableSessionSt ate=readonly and difference between InProc and StateServer mode

Hi,

I have a page with EnableSessionSt ate=readonly in the page directive. A
couple of strange things happen.

When I try to add something to the session, I get no exception. Immediately
after adding the dataset to the session, I can view it in my Watch window.
The watch window also shows that the session is readonly. I would expect an
exception when adding something to a readonly session.

Now the other strange thing is the difference between the InProc and
StateServer mode after adding a dataset to my readonly session. On another
page, when I use InProc and try to access the dataset that I just added to
the readonly session, it simply returns my dataset. However, when using
StateServer, it returns null.

So, first of all, I would expect an exception when adding something to a
readonly session. And second, I would expect the session to return null for
that specific key I just added.

Any ideas?

Thanks,
Jeffry van de Vuurst

Nov 18 '05 #1
0 1748

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

Similar topics

2
23318
by: Marco Gerlach | last post by:
Hello, on IIS6 running on Win2003 server std. I get this error "enablesessionstate Page directive is needed to use the Session object" my web.config looks like this:
6
3275
by: John Baughman | last post by:
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...
6
2482
by: Jeff Smythe | last post by:
Why does Session_Start in Global.asax fire for every page opened during a session of an ASP.NET application? Am I wrong to expect that it would fire only when the first page (i.e., any page in the app that is opened before any other page during the session) is opened? Thanks.
6
2264
by: Martin | last post by:
Hi, I had a page the other day for which the compiler just wouldn't recognize the fact that I had enabled session state in every possible way. I ended up moving the code that dealt with the Session object from code-behind to in-page and it worked. Didn't find an explanation though but it got me up again. Today it got worse. Now what sense does this make:
3
4573
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function Session_Start() { Session.Timeout = 3000; } in global.asax
3
7012
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',''"
3
2231
by: Sean W. | last post by:
I keep getting this error. "Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive" This occurs when I try to add a session variable. .... Session.Add("Nameplate", 1) .... That is in a button click event.
0
1264
by: Nils Hedström | last post by:
I have some problems with my stateserver. First my setup: I am running ASP.NET 1.1.4322 SP 1.1 on one computer and the stateserver on another computer. Both of the machines are Dell Poweredge 2850 (dual processor machines with 2 GB memory). The web server is serving traffic with 2000-4000 sessions and 20-40 requests/s. The web pages are converted from ASP so there is no code behind-pages and some COM-objects. The stateserver machine is...
0
1230
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:
0
9794
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
9642
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,...
1
10539
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10212
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...
0
9319
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
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
5623
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...
0
5788
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3968
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.