Asp Classic - Save page with MSXML2.ServerXMLHTTP.6.0

Asked

Viewed 616 times

2

Good afternoon, I am trying to create a cache system for my site and for this I am using the object MSXML2.ServerXMLHTTP.6.0 in this way:

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 BD the following error occurs.

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

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

I read in some places that we should NOT use "MSXML2.Serverxmlhttp", as in this Microsoft link for example: https://support.microsoft.com/pt-br/kb/316451

But... If I don’t use this component, how else could I be working to record a page in a file?

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

  • I think this is now obsolete, and you have downloaded sdk https://www.microsoft.com/en-us/download/details.aspx?id=4608

1 answer

0

I’ve had problems with it and managed to create the object using one of these two forms:

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

Varies with IIS version

Browser other questions tagged

You are not signed in. Login or sign up in order to post.