From time to time, my web host changes some aspect of the server that this weblog is hosted on. The code that runs this site is written in classic ASP which means it is hosted on IIS. Recently another configuration change took place, presumably one of Microsoft's many hot fixes or an upgrade to a new version of Windows or IIS.
The following error started to appear tagged onto the bottom of every web page:
msxml3.dll error '80004001' Not implemented
Behind the scenes, this site use XML and XSL to separate the site's data from its layout, in the middle somewhere is a line of code which performs an XSLT transformation on the XML DOM into the HTML output which gets squirted out into the response.
' method to transform the response (with errors)
public sub TransformToResponse_Old(xml, xsl)
xml.transformNodeToObject xsl, Response
end sub
Somewhere in the depths of ASP or IIS, a change has occurred which has dropped the IStream support of the classic ASP response object (I presume looking at the symptoms).
The fix introduces an intermediate stream to receive the XSLT transformation, and then send that to the response. This method also sets the response code page to be UTF8, which this site uses.
' method to transform the response (without errors)
public sub TransformToResponse_New(xml, xsl)
' By Tim Hastings, www.nonhostile.com
' prepare stream to receive transformation
dim outputStream
Set outputStream = Server.CreateObject("ADODB.Stream")
outputStream.Open
outputStream.Charset = "UTF-8"
outputStream.Type = 1 ' adTypeBinary
' transform and output to stream
xml.transformNodeToObject xsl, outputStream
' set character-set