Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - xmlHTTP.responseText performance [Thread Next] Re: xmlHTTP.responseText performanceTo: NULL Date: 9/1/2004 1:09:00 PM
WF wrote:
> In the ASP.Net application I develop, I use a javascript code to extract
> datas to an excel file.
> The code is like that :
> xmlhttp = createobject(MSXML2.XMLHTTP)
> xmlhttp.open("get","myurl.aspx?test=data.....",false)
> xmlhttp.send()
> var result = xmlhttp.responseText
> ....
> So, it works perfectly till few days ago. Now, the process for retrieving
> response is long, about one minute.
> Has anybody some ideas about my problem ?
> I believe that it is due to an update on my PC
If you are using Msxml2.XMLHTTP on the client you should better use an
asynchronous request e.g.
var httpRequest = new ActiveXObject('Msxml2.XMLHTTP');
httpRequest.open('GET', 'myurl.aspx?test=data', true);
httpRequest.onreadystatechange = function (evt) {
if (httpRequest.readyState == 4) {
// use httpRequest.responseText or responseXML here
}
}
httpRequest.send(null);
If you are using MSXML on the server in classic ASP you should better
use Msxml2.ServerXMLHTTP where you can then set timeouts as needed.
If you are really using ASP.NET and program on the server you should use
classes from the .NET framework and not MSXML.
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
