Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > using xmlhttp in ASP

Reply
Thread Tools

using xmlhttp in ASP

 
 
Zagor
Guest
Posts: n/a
 
      05-29-2007
I have the code below and in a random fashion it is responding extremely
slowly. On in 3-4 times it takes ages to do the job... Any help will be much
appreciated...
It is the line: xml_http.Send("") that gets stuck. I am on IIS 6 on Windows
Server 2003 Web Edition.

<%
pcode = request.querystring("postcode")

source2 = "http://3rdparty.com/addresslist.pce?postcode=" & pcode

Dim xml_http
Set xml_http = Server.CreateObject("Microsoft.XMLHTTP")
xml_http.Open "GET", source2, false

set source = Server.CreateObject("Microsoft.XMLDOM")
set sourceSorted = Server.CreateObject("Microsoft.XMLDOM")
set styleDoc = Server.CreateObject("Microsoft.XMLDOM")

source.async = true
sourceSorted.async = true
styleDoc.async = true


xml_http.Send("")

source.loadxml(xml_http.ResponseText)

styleDoc.load(Server.MapPath("/postcode/ReDoXmlSorted.xsl"))
source.transformNodeToObject styleDoc, sourceSorted

for each obj in sourceSorted.getElementsByTagName("Address")
'for each obj2 in sourceSorted.getElementsByTagName("PostKey")
' postKey = obj2.text
'next
set pKEy = obj.nextSibling
response.write("<option value='" & pKEy.text & "'>" & replace(obj.text,
pcode, "") & "</option>")
next
xml_http.abort()




%>

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-29-2007
Zagor wrote:
> I have the code below and in a random fashion it is responding
> extremely slowly. On in 3-4 times it takes ages to do the job... Any
> help will be much appreciated...
> It is the line: xml_http.Send("") that gets stuck. I am on IIS 6 on
> Windows Server 2003 Web Edition.
>
> <%
> pcode = request.querystring("postcode")
>
> source2 = "http://3rdparty.com/addresslist.pce?postcode=" & pcode
>
> Dim xml_http
> Set xml_http = Server.CreateObject("Microsoft.XMLHTTP")


Don't use XMLHTTP in server-side code. Instead use

Set xml_http = Server.CreateObject("Microsoft.ServerXMLHTTP")

http://classicasp.aspfaq.com/general...-web-page.html
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic page updates using XMLHTTP =?Utf-8?B?TGFiaGVzaCBTaHJpbWFsaSAtIEJhbmdhbG9yZQ==?= ASP .Net 6 08-08-2007 09:04 AM
Msxml*.XMLHTTP vs. Microsoft.XMLHTTP yawnmoth Javascript 11 11-09-2006 08:44 PM
if in asp is CreateObject("Microsoft.XMLHTTP"). Is in asp.net this Server.CreateObject("MSXML2.ServerXMLHTTP") ? Raúl Martín ASP .Net 1 05-13-2004 03:47 AM
Form action question -- remost POST using XMLHTTP Shannon ASP General 7 09-29-2003 06:03 PM
Re: Classic ASP to ASP.Net XMLHTTP S. Justin Gengo ASP .Net 0 08-27-2003 04:29 PM



Advertisments