473,748 Members | 9,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6029
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******** ******@TK2MSFTN GP14.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

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

ck = Request.ServerV ariables("HTTP_ COOKIE")
set xmlhttp = CreateObject("M SXML2.ServerXML HTTP")
xmlhttp.open "GET", url, false
xmlhttp.setRequ estHeader "Cookie",ck
xmlhttp.send ""
--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

<ch************ ***@gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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
6495
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 called asp-script: "Type Mismatch: Session". I guess it is because it is the XMLHttp object that is now the client (from the servers point ov view), and that object does not share the session with the client-browser containing the
0
1316
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 with the html that gets returned. The pages that contain the desired web content reside in the same application as the "caller". The problem is that all the http requests made using this control are not happening under the same user session as the...
0
1441
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 would not work. But I have tried ("PIN=1234567890&MSSG=Here is a short message - no spaces - just plusses&Q1=0") and the msXML.Send call works perfectly. Does anyone know how or why the PLUSes came to be used in the first place?
2
4493
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 there, just as I do any other version of Windows: if (window.ActiveXObject && !window.XMLHttpRequest) { window.XMLHttpRequest = function() { var msxmls = new Array( 'Msxml2.XMLHTTP.5.0',
4
11436
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 XMLHTTP object. However, when the page requested through the XML object makes a <%Response.Redirect()%> call, a new session is created each time. Is this a flaw in the XMLHTTP Object? How can I force the session to remain the same after a...
3
70205
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
13
25307
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 the version of Microsoft's XML parser and that Microsoft.XMLHTTP refers to the latest installed version. This makes me wonder why sites like <http://developer.apple.com/internet/webcontent/xmlhttpreq.htmlopt to use Msxml2.XMLHTTP, first, and...
1
1497
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: var xmlReqs = new Array(); function CXMLHttp(cb,data,xmlHttp) { this.cb = cb; this.data = data; this.xmlhttp = xmlHttp; }
0
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9370
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.