473,216 Members | 1,275 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

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 5989
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dag Sunde | last post by:
I'm trying to call an ASP script with the XMLHttp object in Client-side Javascript (which goes well). My problem is that the server gives me an error when I try to set a Session variable in the...
0
by: Glenn Venzke | last post by:
I have an asp classic app running on W2000/IIS 5. To cut down on page reloads, I am using client-side javascript to retreive web content using the "XMLHTTP" active x control. I then populate divs...
0
by: MLH | last post by:
In the following code snippet, notice ("PIN=1234567890&MSSG=Here+is+a+short+message+-+no+spaces+-+just+plusses&Q1=0") I have it that way because I thought PLUSes were required and that spaces...
2
by: Ike | last post by:
Is anyone aware of any reason why the following won't work on a Windows Server 2003 r2 64 bit Edition? I am simply calling the following snippet, and trying to execute it in a browser window...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
3
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
13
by: yawnmoth | last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP. If my understanding is correct, the different numbers refer to...
1
by: StevenS | last post by:
Ok, I'm very new to AJAX programming, and fairly new to Javascript. (I was originally trained on low-level C programming.) I'm trying to build a simple AJAX routine in a file named ajax.js: ...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.