Classic Asp - Save page with MSXML2.ServerXMLHTTP.6.0

1

Good afternoon, I'm trying to create a caching system for my site and for this I'm using the MSXML2.ServerXMLHTTP.6.0 object like this:

Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")

url = http://siteexemplo.com.br/teste.asp
objHTTP.open "GET", url, False
objHTTP.setRequestHeader "Content-Type", "text/html; charset=utf-8"
objHTTP.send() 'ocorre o erro

txt = objHTTP.responseText
Response.Write(txt)

If I run the code on a static page it writes the file normally, however, if I run on a page that brings the information from a DB the following error occurs.

  

msxml6.dll error '80072ee2' The operation timed out   /_includes/cache_top.asp, line 46

Line 46 is the "objHTTP.send ()". If I test on my local server, which has IIS7 installed on a windows professional, it works normally, but when I try to use it on my web server that has IIS7 installed on a Windows Serve server, p>

I read in some places that we should NOT use "MSXML2.ServerXMLHTTP", like this link from Microsoft for example: link

But ... If I do not use this component, how else could I be working to write a page to a file?

Or ... how do I solve the problem of MSXML2.ServerXMLHTTP.6.0

    
asked by anonymous 23.05.2016 / 19:44

1 answer

0

I have had problems with this and I was able to create the object using one of two ways:

Set oXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP")
Set oXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")

Varies depending on the version of IIS

    
22.08.2016 / 21:02