473,413 Members | 1,757 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,413 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 3156
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...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
0
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...

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.