XMLHTTP question

D

Dave H

First..

What object (on the client) should I be using these days?

var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
or
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

or maybe something different?

I have some browsers that can't do this correctly. I'm doing:

--client---
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.Open("POST","/App/PostTransactionASP.Aspx?Tran=Update&TranSubCode=xx
x", false);
xmlhttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlhttp.send(requestXML);
sResponseXML = xmlhttp.responseXML.xml;

--server--
Dim sTran, sTranSubCode
Dim oPost As New App.PostTransaction
Response.ContentType = "text/xml"
sTran = Request.QueryString("Tran")
sTranSubCode = Request.QueryString("TranSubCode")

Try
CallByName(oPost, sTran, CallType.Method, sTranSubCode)
Catch
Response.Write<Error>Error</Error>
Response.End
End Try


--------------------
Some browsers always get Error returned, like they're unable to do the
CallByName. Is there some security feature stopping this?

Or, maybe I should start doing these in a completely separate way? I really
like this mechanism, and have been using it internally for a few years, but
on these new client machines it's driving me nuts!

Thanks, Dave
 
S

Steven Cheng[MSFT]

Hi Dave,

Welcome to ASPNET newsgroup.
As for the MSXML component, they're all COM components which is installed
on the clientside machine so that the IE browser can make use of them....
Generally all the latest OS and IE version will contains some common
version of the MSXML version (e.g 2.0 and 3.0...), you can check this
through the following article:

#How To Determine the Version of MSXML Used by Internet Explorer
http://support.microsoft.com/kb/296647/en-us

Also, it point you to the MSXML component's dll (contains type library and
coclasses....) , you can use the OleView.exe tool to view the interfaces
and classes in it (shiped wth platform sdk or Visual studio...)

In addition, if you're familiar with the COM's registry structure, you can
directly lookup the MSXML components in the win 32 registry:

HKEY_CLASSES_ROOT

You'll find many progId of the msxml components such as msxml2 ,
msxml....... and you can get the mapped clsid there so that furtherly
find the component information associated with that ....

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| NNTP-Posting-Date: Thu, 12 Jan 2006 16:19:02 -0600
| From: "Dave H" <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: XMLHTTP question
| Date: Thu, 12 Jan 2006 14:19:08 -0800
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <[email protected]>
| Lines: 47
| NNTP-Posting-Host: 67.180.218.69
| X-Trace:
sv3-h13n1dyUqJnm047DZjZVGqolp2dar4NQPAATfz0vH4QrxorZiIPtvqX9BCnLnfZuhWo7af92
yVIseo0!s1bAKB1s3qFqFcYcZoTPk5ZHSvAJc4SZAihoZ2oywVn1V0PQFiiDatG1xmXx/esolAlj
tJMp37/B!737k
| X-Complaints-To: (e-mail address removed)
| X-DMCA-Complaints-To: (e-mail address removed)
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POST
ED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:370470
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| First..
|
| What object (on the client) should I be using these days?
|
| var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
| or
| var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
| or maybe something different?
|
| I have some browsers that can't do this correctly. I'm doing:
|
| --client---
| var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp.Open("POST","/App/PostTransactionASP.Aspx?Tran=Update&TranSubCode=xx
| x", false);
| xmlhttp.setRequestHeader("Content-Type",
| "application/x-www-form-urlencoded");
| xmlhttp.send(requestXML);
| sResponseXML = xmlhttp.responseXML.xml;
|
| --server--
| Dim sTran, sTranSubCode
| Dim oPost As New App.PostTransaction
| Response.ContentType = "text/xml"
| sTran = Request.QueryString("Tran")
| sTranSubCode = Request.QueryString("TranSubCode")
|
| Try
| CallByName(oPost, sTran, CallType.Method, sTranSubCode)
| Catch
| Response.Write<Error>Error</Error>
| Response.End
| End Try
|
|
| --------------------
| Some browsers always get Error returned, like they're unable to do the
| CallByName. Is there some security feature stopping this?
|
| Or, maybe I should start doing these in a completely separate way? I
really
| like this mechanism, and have been using it internally for a few years,
but
| on these new client machines it's driving me nuts!
|
| Thanks, Dave
|
|
|
 

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,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top