IIS7 ASP Response object incompatible with MSXML transformNodeToObject

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anthony Jones

    IIS7 ASP Response object incompatible with MSXML transformNodeToObject

    People,

    Anyone else got an IIS7 server out there that they can test this little ASP
    file:-

    <%
    Set xml = Server.CreateOb ject("MSXML2.DO MDocument.3.0")
    xml.loadXML "<root />"

    Set xsl = Server.CreateOb ject("MSXML2.DO MDocument.3.0")
    xsl.loadXML "<xsl:styleshee t
    xmlns:xsl=""htt p://www.w3.org/1999/XSL/Transform"" version=""1.0"" >" & _
    "<xsl:outpu t method=""xml"" encoding=""UTF-8"" />" & _
    "<xsl:templ ate match=""root""> <ok /></xsl:template>" & _
    "</xsl:stylesheet> "

    Response.Conten tType = "text/xml"
    Response.CharSe t = "UTF-8"
    xml.documentEle ment.transformN odeToObject xsl, Response

    %>

    The above works fine on IIS6 and below. On IIS7 however it fails with
    0x80004001 Not Implemented on the transformNodeTo Object.

    It seems something has changed in either MSXML or ASP that breaks this code.

    Varitions attempted:-

    Use MSXML6: Still Fails
    Set Response.CodePa ge = 65001: Still fails
    Set encoding in output element to "Windows-1252": Still fails
    Set method to html: Still fails

    Pass a different object that implements IStream: Succeeds.

    Has Response stop implementing IStream use DOMDocument.Sav e and pass in the
    Response object. That succeeds also so Response still implements IStream.

    I note the MSXML3.dll is SP10 on the 2008 server whereas my MSXML3.dll on
    the 2003 server is SP9.

    Can't find any info on changes though.

    Does anyone have any light to shed or can confirm the problem?

    --
    Anthony Jones - MVP ASP/ASP.NET


  • Bob Barrows [MVP]

    #2
    Re: IIS7 ASP Response object incompatible with MSXML transformNodeTo Object

    Anthony Jones wrote:
    People,
    >
    Anyone else got an IIS7 server out there that they can test this
    little ASP file:-
    >
    Leaves me out ... sorry.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Comment

    • Martin Honnen

      #3
      Re: IIS7 ASP Response object incompatible with MSXML transformNodeTo Object

      Anthony Jones wrote:
      xml.documentEle ment.transformN odeToObject xsl, Response
      >
      %>
      >
      The above works fine on IIS6 and below. On IIS7 however it fails with
      0x80004001 Not Implemented on the transformNodeTo Object.
      Does it work if you use
      xml.transformNo deToObject xsl, Response
      ?

      --

      Martin Honnen --- MVP XML

      Comment

      • Anthony Jones

        #4
        Re: IIS7 ASP Response object incompatible with MSXML transformNodeTo Object

        "Martin Honnen" <mahotrash@yaho o.dewrote in message
        news:ePpHlJh%23 IHA.4196@TK2MSF TNGP02.phx.gbl. ..
        Anthony Jones wrote:
        >
        xml.documentEle ment.transformN odeToObject xsl, Response

        %>

        The above works fine on IIS6 and below. On IIS7 however it fails with
        0x80004001 Not Implemented on the transformNodeTo Object.
        >
        Does it work if you use
        xml.transformNo deToObject xsl, Response
        ?
        >

        Martin, Good idea, still doesn't work though. This does appear to be
        specific to the use of transformNodeTo Object and the Response object. It
        works when other IStream implementers are passed to transformNodeTo Object
        and other methods that are designed to write to an IStream work with the
        Response object.

        --
        Anthony Jones - MVP ASP/ASP.NET


        Comment

        • Martin Honnen

          #5
          Re: IIS7 ASP Response object incompatible with MSXML transformNodeTo Object

          Anthony Jones wrote:
          >>xml.documentE lement.transfor mNodeToObject xsl, Response
          >>The above works fine on IIS6 and below. On IIS7 however it fails with
          >>0x80004001 Not Implemented on the transformNodeTo Object.
          This does appear to be
          specific to the use of transformNodeTo Object and the Response object.
          As long as you want to create XML with the transformation you could
          first transform to an MSXML DOM document and then save that to the
          Response object. But writing HTML or plain text as the transformation
          result to the Response object does not seem possible then which is quite
          a breaking change.

          --

          Martin Honnen --- MVP XML

          Comment

          • Anthony Jones

            #6
            Re: IIS7 ASP Response object incompatible with MSXML transformNodeTo Object

            "Martin Honnen" <mahotrash@yaho o.dewrote in message
            news:ey43eWk%23 IHA.5392@TK2MSF TNGP04.phx.gbl. ..
            Anthony Jones wrote:
            >
            >xml.documentEl ement.transform NodeToObject xsl, Response
            >
            >The above works fine on IIS6 and below. On IIS7 however it fails with
            >0x80004001 Not Implemented on the transformNodeTo Object.
            >
            >
            This does appear to be
            specific to the use of transformNodeTo Object and the Response object.
            >
            As long as you want to create XML with the transformation you could
            first transform to an MSXML DOM document and then save that to the
            Response object. But writing HTML or plain text as the transformation
            result to the Response object does not seem possible then which is quite
            a breaking change.
            >

            Exactly, code isn't going to migrate to IIS7 without modification.
            Fortunately for myself my real world stuff uses a library so I need only
            tweak the library with a workaround, whenever I can come up with one.

            For others this could be a more painful experience. I'll try to dig down
            further, currently its not clear whether the problem is in SP10 of MSXML or
            IIS7s ASP Response object.

            --
            Anthony Jones - MVP ASP/ASP.NET


            Comment

            • Anthony Jones

              #7
              Re: IIS7 ASP Response object incompatible with MSXML transformNodeTo Object

              "Anthony Jones" <Ant@yadayadaya da.comwrote in message
              news:%23pjwOeX% 23IHA.2060@TK2M SFTNGP05.phx.gb l...
              People,
              >
              Anyone else got an IIS7 server out there that they can test this little
              ASP
              file:-
              >
              <%
              Set xml = Server.CreateOb ject("MSXML2.DO MDocument.3.0")
              xml.loadXML "<root />"
              >
              Set xsl = Server.CreateOb ject("MSXML2.DO MDocument.3.0")
              xsl.loadXML "<xsl:styleshee t
              xmlns:xsl=""htt p://www.w3.org/1999/XSL/Transform"" version=""1.0"" >" & _
              "<xsl:outpu t method=""xml"" encoding=""UTF-8"" />" & _
              "<xsl:templ ate match=""root""> <ok /></xsl:template>" & _
              "</xsl:stylesheet> "
              >
              Response.Conten tType = "text/xml"
              Response.CharSe t = "UTF-8"
              xml.documentEle ment.transformN odeToObject xsl, Response
              >
              %>
              >
              The above works fine on IIS6 and below. On IIS7 however it fails with
              0x80004001 Not Implemented on the transformNodeTo Object.
              >
              It seems something has changed in either MSXML or ASP that breaks this
              code.
              >
              Varitions attempted:-
              >
              Use MSXML6: Still Fails
              Set Response.CodePa ge = 65001: Still fails
              Set encoding in output element to "Windows-1252": Still fails
              Set method to html: Still fails
              >
              Pass a different object that implements IStream: Succeeds.
              >
              Has Response stop implementing IStream use DOMDocument.Sav e and pass in
              the
              Response object. That succeeds also so Response still implements IStream.
              >
              I note the MSXML3.dll is SP10 on the 2008 server whereas my MSXML3.dll on
              the 2003 server is SP9.
              >
              Can't find any info on changes though.
              >
              Does anyone have any light to shed or can confirm the problem?
              >
              Here is an update on this problem.

              MSXML 3.0 SP10 (msxml3.dll 8.100.1043.0) and MSXML 6.0 SP2 (msxml6.dll
              6.20.1076.0)

              I've only found these on Server 2008 although I haven't checked an XP SP3
              machine or Vista SP1.

              Both of these now call the Commit method on the IStream interface passed to
              the transformNodeTo Object method. Previous versions did not do this. The
              Response object of ASP does not implement this method and throws an error
              when asked to do so.

              The work round is to create a Wrapping Implementation of IStream and absorb
              the Commit call.

              :(


              --
              Anthony Jones - MVP ASP/ASP.NET


              Comment

              Working...