473,946 Members | 6,919 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 1754

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

Similar topics

2
23330
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
3280
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
2502
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
2272
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
4582
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
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',''"
3
2238
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
1267
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
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:
0
11143
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...
1
11328
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
10680
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
7406
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
6100
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
6320
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4930
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
2
4526
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3528
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.