473,382 Members | 1,658 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,382 software developers and data experts.

Please explain the inability to access the Session object

Can u be more specific on your question

Anyway its not like Session variables are available for
sometime and not available for sometime.

When your session starts it is very much available unless
your session ends

One more thing Session variables can very much be used in
Application events

If u explain ur question with a small illustration may be
i can try to figure out your question and try to give reply

-----Original Message-----
OK, can someone provide me with a logicaland architecual reason whythe Session object is only available sometimes??? OK, I understandwhy BEFORE the Session_Start event happens that a session object can'texist, but why not in other events? OK, OK yes on the FIRST requestever, maybe the session object wouldn't exist in
Application_BeginRequest or Application_AuthenticateRequest but let'sface it, after the first request, we all know Session_Start HAS tohave been hit, so the session object does exist! So why can't we getat it in all these application events? Can someone please tell me 1)The logical reason why the Session object (which uh, I think, issuppose to track the entire http session) kind of comes and goes inasp.net and 2) the architectual reason why this behavior has to be.I'm getting fed up trying to figure out when the session object canand cannot be used (please, no diatribes why session object should notbe used) and why 'events' don't seems to understand that other'events' have happened.
.

Jul 19 '05 #1
3 3149
Access to Session object does not seem possible in Application Events:
Application_AuthenticateRequest
Application_BeginRequest
Application_EndRequest

While I can access it in:

Application_AcquireRequestState
using Context.Session

i.e, Context.Session["Test"] = "test" does not work in first three events.
Jul 19 '05 #2
Please refer the link

http://www.dotnet247.com/247referenc...24/121049.aspx

may be this could some how answer your query

-----Original Message-----
Access to Session object does not seem possible in Application Events:

Application_AuthenticateRequest
Application_BeginRequest
Application_EndRequest

While I can access it in:

Application_AcquireRequestState
using Context.Session

i.e, Context.Session["Test"] = "test" does not work in first three events..

Jul 19 '05 #3
I've seen that post, it still doesn't explain why session object is
available in some requests and not others and why this has to be so.
Oh well....

"Vijay Shankar" <kv******@cognizant.com> wrote in message news:<07****************************@phx.gbl>...
Please refer the link

http://www.dotnet247.com/247referenc...24/121049.aspx

may be this could some how answer your query

-----Original Message-----
Access to Session object does not seem possible in

Application Events:


Application_AuthenticateRequest
Application_BeginRequest
Application_EndRequest

While I can access it in:

Application_AcquireRequestState
using Context.Session

i.e, Context.Session["Test"] = "test" does not work in

first three events.
.

Jul 19 '05 #4

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

Similar topics

3
by: VijayShankar | last post by:
Can u be more specific on your question Anyway its not like Session variables are available for sometime and not available for sometime. When your session starts it is very much available...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
4
by: Christina N | last post by:
Can anyone give me a code example of how to use a global array to keep track of all active sessions (their sessionid, logontime, etc)? I need a code example, not a prosa description of what to...
6
by: David Lozzi | last post by:
Howdy, I'm new to classes. Below is my class User. (is this a reserved namespace or class?) It works great, kind of. If I specify the username and password, the correct firstname and lastname...
3
by: Shawn | last post by:
Hi. In my application I store information about the user in the session object. Since I'm storing sensitive information I encrypt it before storing and decrypt it when I need to use it again. The...
2
by: William Sullivan | last post by:
I'm dying here... I have an object that I use to access objects in the session state. I may be reading and writing at the same time, so I am trying to make the accessors thread safe using...
2
by: rsouza | last post by:
Hi. Recently here in my work we added the following code in the Global.asax file to handled the session expired and redirect users to the home of the site explaining them the occurred (some...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
5
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.