MSXML.XMLHTTP / ASP Page / Session

M

Martin Waller

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
 
M

Manohar Kamath

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

chrisgeorgeoliver

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 =/
 
C

chrisgeorgeoliver

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 =/
 
M

Mark Schupp

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 ""
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top