Microsoft.XMLHTTP: pages not updating

Microsoft.XMLHTTP: pages not updating

am 11.01.2007 10:08:05 von Skyblue

I use Microsoft.XMLHTTP to access htm or asp pages on a central web
site from other satellite sites. In this way, the same content can be
displayed on a dozen websites and I only need to update one file in
order to change the content displayed on all the websites.
I have noticed that when I update the text in the file which is
accessed by Microsoft.XMLHTTP (testXML.htm in the example below), the
updates do not appear for some time on the pages which are referencing
testXML.htm. All the sites, central and satellite, are on shared Win3K
servers. The problem has got worse recently. Could it be related to an
update to the server software or components?


dim objXMLHTTP
set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")

objXMLHTTP.Open "GET", "http://XXX.XXX.XXX.XXX/includes/testXML.htm",
false
objXMLHTTP.SetRequestHeader "Content-type", "text/html"
objXMLHTTP.Send

response.write objXMLHTTP.ResponseText
set objXMLHTTP = nothing

Re: Microsoft.XMLHTTP: pages not updating

am 11.01.2007 10:32:38 von Anthony Jones

"Skyblue" wrote in message
news:1168506485.754116.276340@i56g2000hsf.googlegroups.com.. .
> I use Microsoft.XMLHTTP to access htm or asp pages on a central web
> site from other satellite sites. In this way, the same content can be
> displayed on a dozen websites and I only need to update one file in
> order to change the content displayed on all the websites.
> I have noticed that when I update the text in the file which is
> accessed by Microsoft.XMLHTTP (testXML.htm in the example below), the
> updates do not appear for some time on the pages which are referencing
> testXML.htm. All the sites, central and satellite, are on shared Win3K
> servers. The problem has got worse recently. Could it be related to an
> update to the server software or components?
>
>
> dim objXMLHTTP
> set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
>
> objXMLHTTP.Open "GET", "http://XXX.XXX.XXX.XXX/includes/testXML.htm",
> false
> objXMLHTTP.SetRequestHeader "Content-type", "text/html"
> objXMLHTTP.Send
>
> response.write objXMLHTTP.ResponseText
> set objXMLHTTP = nothing
>

The problem will be that the content will be cached on the satalite systems
requesting the resources. Only when WinInet (the http stack underpinning
XMLHTTP) decides it's copy of the resource is not fresh will it request a
new copy from the origin server.

Using XMLHTTP inside ASP is a dangerous thing to do anyway, it isn't thread
safe.

You should be using MSXML2.ServerXMLHTTP.3.0 instead. This does no caching
and is thread safe.

Anthony.

Re: Microsoft.XMLHTTP: pages not updating

am 11.01.2007 10:51:45 von exjxw.hannivoort

Skyblue wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:

> I use Microsoft.XMLHTTP to access htm or asp pages on a central web
> site from other satellite sites. In this way, the same content can be
> displayed on a dozen websites and I only need to update one file in
> order to change the content displayed on all the websites.
> I have noticed that when I update the text in the file which is
> accessed by Microsoft.XMLHTTP (testXML.htm in the example below), the
> updates do not appear for some time on the pages which are referencing
> testXML.htm. All the sites, central and satellite, are on shared Win3K
> servers. The problem has got worse recently. Could it be related to an
> update to the server software or components?
>
>
> dim objXMLHTTP
> set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")

Try:

set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)