httpcontext.current.session doesn't get correct session

Discussion in 'ASP .Net' started by midgetgem@boltblue.com, May 16, 2005.

  1. Guest

    I'm storing a DataTable in a session object and call a seperate class
    with a method in it to work with.

    How do I access the session from this class?

    I was using HttpContext.Current.Session, but that isn't the same
    session (has a different session ID).

    Could I pass in the session as a reference and if so, how?

    Or could I pass in the session ID and then retrieve that session from
    the other class, and again, if so, how?

    Thanks in advance

    G
    , May 16, 2005
    #1
    1. Advertising

  2. Lucas Tam Guest

    "" <> wrote in
    news::

    > I was using HttpContext.Current.Session, but that isn't the same
    > session (has a different session ID).
    >
    > Could I pass in the session as a reference and if so, how?
    >
    > Or could I pass in the session ID and then retrieve that session from
    > the other class, and again, if so, how?


    Try passing in an entire context object to the child class. See if that
    works.

    Sort of odd that the context in the child class would be different however
    : )

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
    Lucas Tam, May 16, 2005
    #2
    1. Advertising

  3. I have a hard time with the HttpContext.Current.Session being different with
    than the Page.Session object. Are you in the same thread? Is it possible
    there is a concurrency issue with your class?

    bill


    <> wrote in message
    news:...
    > I'm storing a DataTable in a session object and call a seperate class
    > with a method in it to work with.
    >
    > How do I access the session from this class?
    >
    > I was using HttpContext.Current.Session, but that isn't the same
    > session (has a different session ID).
    >
    > Could I pass in the session as a reference and if so, how?
    >
    > Or could I pass in the session ID and then retrieve that session from
    > the other class, and again, if so, how?
    >
    > Thanks in advance
    >
    > G
    >
    William F. Robertson, Jr., May 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. moondaddy
    Replies:
    2
    Views:
    17,893
    Eric Lawrence [MSFT]
    Feb 29, 2004
  2. Mike Newton
    Replies:
    0
    Views:
    2,866
    Mike Newton
    Jul 23, 2004
  3. Steve C. Orr [MVP, MCSD]
    Replies:
    0
    Views:
    1,587
    Steve C. Orr [MVP, MCSD]
    Jul 23, 2004
  4. John Dalberg
    Replies:
    3
    Views:
    3,181
    =?Utf-8?B?RWx0b24gVw==?=
    Apr 29, 2005
  5. Tony

    Dim context As HttpContext = HttpContext.Current

    Tony, Mar 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    295
    Teemu Keiski
    Mar 3, 2004
Loading...

Share This Page