Can I retrive a session object by a session ID?

Discussion in 'ASP .Net' started by =?Utf-8?B?VG90bw==?=, Jun 9, 2006.

  1. Can I retrive a session object by a session ID which is stored in a cookie in
    my server side code?
     
    =?Utf-8?B?VG90bw==?=, Jun 9, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?VG90bw==?=

    Patrice Guest

    What is the context ? This is exactly what ASP.NET does already for you...

    If you want to access data from another session, this is possible with the
    SQL Server provider, AFAIK not possible with the inproc provider. In both
    cases a possibly better solution is to consider that the data is not session
    specific as you want anyway to access it from another session (i.e. it looks
    like more something to be stored in an application wide list).

    You may want to explain what you are trying to do for more accurate
    suggestions...

    - -

    Patrice

    "Toto" <> a écrit dans le message de news:
    ...
    > Can I retrive a session object by a session ID which is stored in a cookie
    > in
    > my server side code?
     
    Patrice, Jun 9, 2006
    #2
    1. Advertising

  3. Oh, thank you for your reply.
    In fact, I want to use session to store some user information in the server
    side (e.g. username and password). But I found out that data in a session
    cannot be retrived while the broswer is restart. So I try to store the
    session ID in a cookie and hope to retrive the server side session by the
    session ID. I don't know if this is possible? Of course this can be done by
    cookies. But the username and password must be encrypted or there is a risk.
    So I think session in server side may be more safe.

    "Patrice" wrote:

    > What is the context ? This is exactly what ASP.NET does already for you...
    >
    > If you want to access data from another session, this is possible with the
    > SQL Server provider, AFAIK not possible with the inproc provider. In both
    > cases a possibly better solution is to consider that the data is not session
    > specific as you want anyway to access it from another session (i.e. it looks
    > like more something to be stored in an application wide list).
    >
    > You may want to explain what you are trying to do for more accurate
    > suggestions...
    >
    > - -
    >
    > Patrice
    >
    > "Toto" <> a écrit dans le message de news:
    > ...
    > > Can I retrive a session object by a session ID which is stored in a cookie
    > > in
    > > my server side code?

    >
    >
    >
     
    =?Utf-8?B?VG90bw==?=, Jun 10, 2006
    #3
  4. Oh, thank you for your comments.
    In fact, I want to use session to store some user information in the server
    side (e.g. username and password). But I found out that data in a session
    cannot be retrived while the broswer is restart. So I try to store the
    session ID in a cookie and hope to retrive the server side session by the
    session ID. I don't know if this is possible? Of course this can be done by
    cookies. But the username and password must be encrypted or there is a risk.
    So I think session in server side may be more safe.

    "Patrice" wrote:

    > What is the context ? This is exactly what ASP.NET does already for you...
    >
    > If you want to access data from another session, this is possible with the
    > SQL Server provider, AFAIK not possible with the inproc provider. In both
    > cases a possibly better solution is to consider that the data is not session
    > specific as you want anyway to access it from another session (i.e. it looks
    > like more something to be stored in an application wide list).
    >
    > You may want to explain what you are trying to do for more accurate
    > suggestions...
    >
    > - -
    >
    > Patrice
    >
    > "Toto" <> a écrit dans le message de news:
    > ...
    > > Can I retrive a session object by a session ID which is stored in a cookie
    > > in
    > > my server side code?

    >
    >
    >
     
    =?Utf-8?B?VG90bw==?=, Jun 10, 2006
    #4
  5. Oh, thank you for your comments.
    In fact, I want to use session to store some user information in the server
    side (e.g. username and password). But I found out that data in a session
    cannot be retrived while the broswer is restart. So I try to store the
    session ID in a cookie and hope to retrive the server side session by the
    session ID. I don't know if this is possible? Of course this can be done by
    cookies. But the username and password must be encrypted or there is a risk.
    So I think session in server side may be more safe.

    "Patrice" wrote:

    > What is the context ? This is exactly what ASP.NET does already for you...
    >
    > If you want to access data from another session, this is possible with the
    > SQL Server provider, AFAIK not possible with the inproc provider. In both
    > cases a possibly better solution is to consider that the data is not session
    > specific as you want anyway to access it from another session (i.e. it looks
    > like more something to be stored in an application wide list).
    >
    > You may want to explain what you are trying to do for more accurate
    > suggestions...
    >
    > - -
    >
    > Patrice
    >
    > "Toto" <> a écrit dans le message de news:
    > ...
    > > Can I retrive a session object by a session ID which is stored in a cookie
    > > in
    > > my server side code?

    >
    >
    >
     
    =?Utf-8?B?VG90bw==?=, Jun 10, 2006
    #5
    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. Tony Dong
    Replies:
    0
    Views:
    471
    Tony Dong
    Dec 20, 2005
  2. vijay
    Replies:
    2
    Views:
    3,393
    vijaya kumar.P
    Aug 29, 2003
  3. Santosh

    Retrive data from session variables

    Santosh, Jul 14, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,667
    Hans Kesting
    Jul 14, 2006
  4. Hoa
    Replies:
    5
    Views:
    148
  5. Replies:
    1
    Views:
    131
    Austin Ziegler
    Mar 6, 2007
Loading...

Share This Page