Microsoft.XMLHTTP vs Msxml2.ServerXMLHTTP.4.0 ?

A

Arnaud

Hi,

I'm trying to translate an asp application, i have some difficulties with a
particular line :
---
Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
---

Classical ajax exemples rather use :
[...]
req = new ActiveXObject("Microsoft.XMLHTTP");

.... But i'm not sure the ActiveXObject is identical to the original :
Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")

I'm not an asp expert, can you give me some tips on that question ?

Thanks,
Arnaud
 
M

Martin Honnen

Arnaud wrote:

I'm trying to translate an asp application, i have some difficulties with a
particular line :
---
Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
---

Classical ajax exemples rather use :
[...]
req = new ActiveXObject("Microsoft.XMLHTTP");

What exactly are you trying to do, translate a VBScript ASP sample to a
JScript ASP sample? Then use
var myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0");
That will use the server version of the XMLHTTP object of MSXML 4 which
means MSXML 4 needs to be installed on the server where you want to run
the JScript ASP page.
 
A

Arnaud

Martin Honnen said:
What exactly are you trying to do, translate a VBScript ASP sample to a
JScript ASP sample? Then use
var myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0");
That will use the server version of the XMLHTTP object of MSXML 4 which
means MSXML 4 needs to be installed on the server where you want to run
the JScript ASP page.

Hi,
Actually I'm trying to translate it into php so i won't have any msxml4
installed on the server.
That's why I tried the ajax/client approach : to avoid dealing with a server
object.
Have I a chance to see it works one day ? :)

Arnaud
 
M

Martin Honnen

Arnaud said:
Actually I'm trying to translate it into php so i won't have any msxml4
installed on the server.
That's why I tried the ajax/client approach : to avoid dealing with a server
object.

I am not sure I really understand why you are asking in a JavaScript
group if you want to convert server side VBScript/ASP to PHP but as for
those objects, they have many common properties and methods but there
are some differences. Documentation is here:
<http://msdn.microsoft.com/library/d...html/7924f6be-c035-411f-acd2-79de7a711b38.asp>
<http://msdn.microsoft.com/library/d...html/1aac5bb8-3647-44cf-a1ce-c220ba464509.asp>
So ServerXMLHTTP has methods like setTimeouts, waitForResponse that the
XMLHTTP does not have.
 
A

Arnaud

Martin Honnen said:
I am not sure I really understand why you are asking in a JavaScript group
if you want to convert server side VBScript/ASP to PHP

Because I have tried some ajax code too, so I said myself perhaps someone
would know the solution.
but as for those objects, they have many common properties and methods but
there are some differences. Documentation is here:
<http://msdn.microsoft.com/library/d...html/7924f6be-c035-411f-acd2-79de7a711b38.asp>
<http://msdn.microsoft.com/library/d...html/1aac5bb8-3647-44cf-a1ce-c220ba464509.asp>
So ServerXMLHTTP has methods like setTimeouts, waitForResponse that the
XMLHTTP does not have.

Thanks, I'm going to study your links, I've tried the msdn documentation on
some asp keywords but it's not so easy to read where you're not used to ms
world.

bye
arnaud
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top