How to get session value at where out of asp.net process domain?(session ID is known)

Discussion in 'ASP .Net Security' started by ocean, Oct 16, 2005.

  1. ocean

    ocean Guest

    The scenario:
    I have a web application(asp.net);
    This web application need an ACTIVEX control to perform some advanced
    communication work;
    The activex control run at where out of web application process.(run at
    customer's computer).Now the question is,how the control login to the
    server?The application check the user login status through session state. My
    idead as follow:
    1.The control gets sessionID through IHTMLDocument2 interface(a COM
    interface);
    2.Send this value to the server;(i plan to run a process on the server
    side to receive this value);
    3.the process read the session associated with this sessionID and check
    if this session logined.then reply the control.

    Now i can get the sessionID.but don't know how to get the session by
    sessionID;

    thanks advance.
    ocean, Oct 16, 2005
    #1
    1. Advertising

  2. ocean

    Sundher Guest

    You can try this code snippet

    System.Collections.IEnumerator iEnumSessions = Session.GetEnumerator();
    while(iEnumSessions.MoveNext())
    {
    HttpSessionState hss = (Session)
    iEnumSessions.Current;
    if(hss.SessionID == "SessionID1")
    {
    //DO code
    }

    }
    Sundher, Oct 17, 2005
    #2
    1. Advertising

  3. ocean

    ocean Guest

    The session enums were still in the current session.In fact,I want to get
    the othere customer's session value ---- sessionID specified.

    "Sundher" <> ????
    news:...
    > You can try this code snippet
    >
    > System.Collections.IEnumerator iEnumSessions = Session.GetEnumerator();
    > while(iEnumSessions.MoveNext())
    > {
    > HttpSessionState hss = (Session)
    > iEnumSessions.Current;
    > if(hss.SessionID == "SessionID1")
    > {
    > //DO code
    > }
    >
    > }
    >
    ocean, Oct 18, 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. Replies:
    1
    Views:
    698
    =?Utf-8?B?QWx0YWYgQWwtQW1pbiBOYWp3YW5p?=
    May 19, 2006
  2. Fossie
    Replies:
    5
    Views:
    902
    Fossie
    Feb 11, 2004
  3. smoother
    Replies:
    0
    Views:
    370
    smoother
    Aug 2, 2006
  4. sunkrajesh
    Replies:
    0
    Views:
    348
    sunkrajesh
    May 31, 2009
  5. Navin Mishra

    How to get process id of hosting ASP.NET worker process ?

    Navin Mishra, Feb 7, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    411
    Navin Mishra
    Feb 7, 2006
Loading...

Share This Page