Please explain the inability to access the Session object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VijayShankar

    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

    [color=blue]
    >-----Original Message-----
    >OK, can someone provide me with a logicaland architecual[/color]
    reason why[color=blue]
    >the Session object is only available sometimes??? OK, I[/color]
    understand[color=blue]
    >why BEFORE the Session_Start event happens that a session[/color]
    object can't[color=blue]
    >exist, but why not in other events? OK, OK yes on the[/color]
    FIRST request[color=blue]
    >ever, maybe the session object wouldn't exist in
    >Application_Be ginRequest or[/color]
    Application_Aut henticateReques t but let's[color=blue]
    >face it, after the first request, we all know[/color]
    Session_Start HAS to[color=blue]
    >have been hit, so the session object does exist! So why[/color]
    can't we get[color=blue]
    >at it in all these application events? Can someone[/color]
    please tell me 1)[color=blue]
    >The logical reason why the Session object (which uh, I[/color]
    think, is[color=blue]
    >suppose to track the entire http session) kind of comes[/color]
    and goes in[color=blue]
    >asp.net and 2) the architectual reason why this behavior[/color]
    has to be.[color=blue]
    >I'm getting fed up trying to figure out when the session[/color]
    object can[color=blue]
    >and cannot be used (please, no diatribes why session[/color]
    object should not[color=blue]
    >be used) and why 'events' don't seems to understand that[/color]
    other[color=blue]
    >'events' have happened.
    >.
    >[/color]
  • Patrich Lynch

    #2
    Re: Please explain the inability to access the Session object

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


    Application_Aut henticateReques t
    Application_Beg inRequest
    Application_End Request

    While I can access it in:

    Application_Acq uireRequestStat e


    using Context.Session

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

    Comment

    • Vijay Shankar

      #3
      Re: Please explain the inability to access the Session object

      Please refer the link



      may be this could some how answer your query



      [color=blue]
      >-----Original Message-----
      >Access to Session object does not seem possible in[/color]
      Application Events:[color=blue]
      >
      >
      > Application_Aut henticateReques t
      > Application_Beg inRequest
      > Application_End Request
      >
      >While I can access it in:
      >
      > Application_Acq uireRequestStat e
      >
      >
      >using Context.Session
      >
      > i.e, Context.Session["Test"] = "test" does not work in[/color]
      first three events.[color=blue]
      >.
      >[/color]

      Comment

      • Patrich Lynch

        #4
        Re: Please explain the inability to access the Session object

        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" <kvijaysh@cogni zant.com> wrote in message news:<078901c34 76d$da4c32a0$a3 01280a@phx.gbl> ...[color=blue]
        > Please refer the link
        >
        > http://www.dotnet247.com/247referenc...24/121049.aspx
        >
        > may be this could some how answer your query
        >
        >
        >
        >[color=green]
        > >-----Original Message-----
        > >Access to Session object does not seem possible in[/color]
        > Application Events:[color=green]
        > >
        > >
        > > Application_Aut henticateReques t
        > > Application_Beg inRequest
        > > Application_End Request
        > >
        > >While I can access it in:
        > >
        > > Application_Acq uireRequestStat e
        > >
        > >
        > >using Context.Session
        > >
        > > i.e, Context.Session["Test"] = "test" does not work in[/color]
        > first three events.[color=green]
        > >.
        > >[/color][/color]

        Comment

        Working...