ASP Sessions

Discussion in 'ASP General' started by bobbyballgame, Jan 13, 2004.

  1. I am using ServerXmlHttp in a client-side component to basically talk back
    to the Server within a webpage. I would like to be able to cache some
    information on the server so that when I callback, I do not have to
    reconstitue everything that I did for the intial request. However, the
    Sessions are different.

    Is there a way to get the ServerXmlHttp session to impersonate the IE client
    session?

    Here is a quick run down


    Set Conn = ADODB.Connection
    ' Initialize and open Connection
    Conn.GetMassiveAmountOfDataFromFarAwayDataLocation ID, RS

    XmlStr = FormatDataAsXml( RS )

    Session( "CurrentData" ) = XmlStr

    ' *******************************

    ' The ServerXmlHttp Loads and would request the same thing. For a variety of
    reasons, I do not want the XML sent down as an xml tag in the HTML. So,
    basically the question is, Is there a way for the ServerXmlHttp, embedded in
    a client HTML page, to access the Session variable specified above?

    Thanks,
    BB
     
    bobbyballgame, Jan 13, 2004
    #1
    1. Advertising

  2. I worked out the answer on another group ( WINHTTP I believe): here is the
    last of it


    So, an easier way, to do this is:

    <script>
    function GetCookieData( ){
    var cookieString = document.cookie;
    return cookieString;
    }

    function GetSession(){
    var myCookies = GetCookieData(); // This will pass all cookies

    var xmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.4.0");
    xmlServerHttp.open("GET", "http://MyServer/SessionNumberServer.asp",
    false);
    xmlServerHttp.setRequestHeader("COOKIE", myCookies); // 'HTTP_' prefix
    is added
    xmlServerHttp.send();
    alert( xmlServerHttp.responseText ); // This should be from the same
    session
    }
    </script>

    Thanks,
    BB


    "bobbyballgame" <> wrote in message
    news:uvOrH%...
    > I am using ServerXmlHttp in a client-side component to basically talk back
    > to the Server within a webpage. I would like to be able to cache some
    > information on the server so that when I callback, I do not have to
    > reconstitue everything that I did for the intial request. However, the
    > Sessions are different.
    >
    > Is there a way to get the ServerXmlHttp session to impersonate the IE

    client
    > session?
    >
    > Here is a quick run down
    >
    >
    > Set Conn = ADODB.Connection
    > ' Initialize and open Connection
    > Conn.GetMassiveAmountOfDataFromFarAwayDataLocation ID, RS
    >
    > XmlStr = FormatDataAsXml( RS )
    >
    > Session( "CurrentData" ) = XmlStr
    >
    > ' *******************************
    >
    > ' The ServerXmlHttp Loads and would request the same thing. For a variety

    of
    > reasons, I do not want the XML sent down as an xml tag in the HTML. So,
    > basically the question is, Is there a way for the ServerXmlHttp, embedded

    in
    > a client HTML page, to access the Session variable specified above?
    >
    > Thanks,
    > BB
    >
    >
     
    bobbyballgame, Jan 15, 2004
    #2
    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. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,426
    Luther Miller
    Aug 8, 2003
  2. Bruno Alexandre

    sessions in ASP.NET vs ASP

    Bruno Alexandre, Aug 13, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    2,532
    Bruno Alexandre
    Aug 18, 2003
  3. Bruno Alexandre

    ASP vs ASP.NET sessions (2nd post)

    Bruno Alexandre, Aug 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    572
    Marina
    Aug 18, 2003
  4. scottymo
    Replies:
    3
    Views:
    777
    Dominick Baier
    Sep 30, 2006
  5. Bookham Measures

    Moving from ASP Sessions to Database Sessions

    Bookham Measures, Jul 23, 2007, in forum: ASP General
    Replies:
    19
    Views:
    605
    Bookham Measures
    Aug 23, 2007
Loading...

Share This Page