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. Advertisements

  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. Advertisements

  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.
     
    ocean, Oct 18, 2005
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.