msxml3.dll error '80004001' XML transformNodeToObject - Not implemented (80004001)

由于服务器配置更新,一个基于经典ASP的网站出现'80004001'错误,影响了XML到HTML的XSLT转换。错误源于ASP或IIS中IStream支持的丢失。解决方案是引入中间流来接收XSLT转换,然后将其发送到响应,并设置响应编码为UTF8。
摘要由CSDN通过智能技术生成

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
      
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值