473,386 Members | 1,867 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,386 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 6004
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.