MSXML.XMLHTTP / ASP Page / Session

Discussion in 'ASP General' started by Martin Waller, Oct 11, 2004.

  1. Hello,

    I'm using the MSXML.XMLHTTP object to obtain the results of an ASP page from
    an ASP page on the same server. The problem I have is that when the AP
    refrenced by the XMLHTTP object is run it does now share the session with
    the calling page ? How can I solve this ?

    Any ideas ?

    Many thanks...

    Martin
     
    Martin Waller, Oct 11, 2004
    #1
    1. Advertising

  2. The XMLHttp component is now the "client" for your ASP page, and not the
    browser.

    One way to get around is to retrieve the ASPSESSIONID cookie from the
    browser, and set it in your code for the XMLhttp component. This way, both
    browser and the XMLHttp component are using the same ASSPSESSIONID cookie to
    talk to the ASP pages, and hence maintain the session.

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "Martin Waller" <> wrote in message
    news:...
    > Hello,
    >
    > I'm using the MSXML.XMLHTTP object to obtain the results of an ASP page

    from
    > an ASP page on the same server. The problem I have is that when the AP
    > refrenced by the XMLHTTP object is run it does now share the session with
    > the calling page ? How can I solve this ?
    >
    > Any ideas ?
    >
    > Many thanks...
    >
    > Martin
    >
    >
     
    Manohar Kamath, Oct 11, 2004
    #2
    1. Advertising

  3. Martin Waller

    Guest

    I'm having the same problem... where do you set the aspsessionid to the
    xmlhttp obj? right before the send? and what property do you set.. i
    couldnt find a object model anywhere =/

    Manohar Kamath wrote:
    > The XMLHttp component is now the "client" for your ASP page, and not

    the
    > browser.
    >
    > One way to get around is to retrieve the ASPSESSIONID cookie from the
    > browser, and set it in your code for the XMLhttp component. This way,

    both
    > browser and the XMLHttp component are using the same ASSPSESSIONID

    cookie to
    > talk to the ASP pages, and hence maintain the session.
    >
     
    , Mar 11, 2005
    #3
  4. Martin Waller

    Guest

    I'm having the same problem... where do you set the aspsessionid to the
    xmlhttp obj? right before the send? and what property do you set.. i
    couldnt find a object model anywhere =/

    Manohar Kamath wrote:
    > The XMLHttp component is now the "client" for your ASP page, and not

    the
    > browser.
    >
    > One way to get around is to retrieve the ASPSESSIONID cookie from the
    > browser, and set it in your code for the XMLhttp component. This way,

    both
    > browser and the XMLHttp component are using the same ASSPSESSIONID

    cookie to
    > talk to the ASP pages, and hence maintain the session.
    >
     
    , Mar 11, 2005
    #4
  5. Martin Waller

    Mark Schupp Guest

    You should be able to do that with the

    setRequestHeader method something like this (not tested, just from docs)

    ck = Request.ServerVariables("HTTP_COOKIE")
    set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
    xmlhttp.open "GET", url, false
    xmlhttp.setRequestHeader "Cookie",ck
    xmlhttp.send ""


    --
    --Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com

    <> wrote in message
    news:...
    > I'm having the same problem... where do you set the aspsessionid to the
    > xmlhttp obj? right before the send? and what property do you set.. i
    > couldnt find a object model anywhere =/
    >
    > Manohar Kamath wrote:
    >> The XMLHttp component is now the "client" for your ASP page, and not

    > the
    >> browser.
    >>
    >> One way to get around is to retrieve the ASPSESSIONID cookie from the
    >> browser, and set it in your code for the XMLhttp component. This way,

    > both
    >> browser and the XMLHttp component are using the same ASSPSESSIONID

    > cookie to
    >> talk to the ASP pages, and hence maintain the session.
    >>

    >
     
    Mark Schupp, Mar 11, 2005
    #5
  6. Martin Waller

    CGOliver Guest

    no dice, i ended up just passing all my vars through the querystring =/
     
    CGOliver, Mar 11, 2005
    #6
    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. KathyB
    Replies:
    0
    Views:
    1,024
    KathyB
    Jun 25, 2003
  2. Ray
    Replies:
    1
    Views:
    283
    Martin Honnen
    May 31, 2004
  3. Puff
    Replies:
    2
    Views:
    117
  4. Dag Sunde

    XMLHttp/AJAX and ASP Session variables

    Dag Sunde, Aug 10, 2005, in forum: Javascript
    Replies:
    3
    Views:
    166
    Dag Sunde
    Aug 10, 2005
  5. yawnmoth

    Msxml*.XMLHTTP vs. Microsoft.XMLHTTP

    yawnmoth, Nov 7, 2006, in forum: Javascript
    Replies:
    11
    Views:
    396
    Matt Kruse
    Nov 9, 2006
Loading...

Share This Page