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

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
        Response.CharSet = "UTF-8"
        Response.ContentType = "text/html"        
        Session.CodePage = 65001
        
        ' rewind the stream and send to response
        outputStream.Position = 0
        Response.BinaryWrite outputStream.Read()
                                
        ' finished with the stream
        outputStream.Close
        set outputStream = Nothing

    end sub

 

 

The code that runs this site is written in classic ASP which means it is hosted on IIS.该代码运行这个网站是用在传统的ASP这意味着它是在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.最近,另一个配置发生变化,可能是微软的许多热修复或到Windows或IIS一个新的版本升级。

The following error started to appear tagged onto the bottom of every web page:下面的错误开始出现走上每个网页底部的标签:

     msxml3.dll error '80004001' msxml3.dll的错误'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.在幕后,本网站使用XML和XSL分开网站的数据的布局在中间,是一个地方的代码行的执行一个基于XML DOM的HTML输出到它获取喷入反应进行XSLT转换。

    ' method to transform the response (with errors) '方法来改变反应(有错误)
    public sub TransformToResponse_Old(xml, xsl) 公众分 TransformToResponse_Old(的XML,XSL)
        xml.transformNodeToObject xsl, Response xml.transformNodeToObject样式,反应
    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).在某处或IIS的ASP,一个已发生的已放弃了传统的ASP Response对象的IStream支持改革的深度(我相信看的症状)。

The fix introduces an intermediate stream to receive the XSLT transformation, and then send that to the response.此修复程序引入了一个中间流接收XSLT转换,然后发送,为了响应。 This method also sets the response code page to be UTF8, which this site uses.此方法还设置响应代码页是UTF8的,本网站使用。

    ' method to transform the response (without errors) '方法来改变反应(没有错误)
    public sub TransformToResponse_New(xml, xsl) 公众分 TransformToResponse_New(的XML,XSL)

        ' By Tim Hastings, www.nonhostile.com '作者:Tim黑斯廷斯,www.nonhostile.com
        ' prepare stream to receive transformation '准备接收流改造
        dim outputStream 暗淡的OutputStream
        Set outputStream = Server.CreateObject( "ADODB.Stream" ) 设置的OutputStream = Server.CreateObject(“的ADODB.Stream”)
        outputStream.Open outputStream.Open 
        outputStream.Charset = "UTF-8" outputStream.Charset =“UTF - 8的”
        outputStream.Type = 1 ' adTypeBinary outputStream.Type = 1'adTypeBinary

        ' transform and output to stream '转换和输出流
        xml.transformNodeToObject xsl, outputStream xml.transformNodeToObject样式,OutputStream中
        
        ' set character-set '设置字符集
        Response.CharSet = "UTF-8" Response.CharSet =“UTF - 8的”
        Response.ContentType = "text/html" Response.ContentType =“文本/ HTML”        
        Session.CodePage = 65001 Session.CodePage = 65001
        
        ' rewind the stream and send to response '绕流和发送的反应
        outputStream.Position = 0 outputStream.Position = 0
        Response.BinaryWrite outputStream.Read() Response.BinaryWrite outputStream.Read()
                                
        ' finished with the stream '完成与流
        outputStream.Close outputStream.Close
        set outputStream = Nothing 没有设置的OutputStream =

    end sub 结束分

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值