469,327 Members | 1,337 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

MSXML.XMLHTTP / ASP Page / Session

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
Jul 19 '05 #1
5 5815
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" <Ma***********@NOSPAN.com> wrote in message
news:OP**************@TK2MSFTNGP14.phx.gbl...
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

Jul 19 '05 #2
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.


Jul 22 '05 #3
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.


Jul 22 '05 #4
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

<ch***************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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.

Jul 22 '05 #5
no dice, i ended up just passing all my vars through the querystring =/

Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dag Sunde | last post: by
3 posts views Thread by Sharon | last post: by
13 posts views Thread by yawnmoth | last post: by
1 post views Thread by StevenS | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.