Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Heads up, Update 955069 breaks transformNodeToObject in ASP

From: "Anthony Jones" <AnthonyWJones@------------.--->
To: NULL
Date: 11/12/2008 12:00:00 PM
This info is for those of you who are using the transformNodeToObject method 
in an ASP page to send the results of the transform directly to the ASP 
Response object.

The security update 955069 includes a change in behaviour where the IStream 
passed in the output parameter has its Commit method called where in older 
version this never called.  The IStream implemention in on ASP Response 
object will through an error if its Commit method is called.

Workarounds:

    1.  Don't install 955069 (not recommend its a security update).
    2.  Create an IStream wrapper object that delegates to an inner IStream 
except the Commit method.
    3.  Don't use transfomNodeToObject just transformNode and Response.Write
    4.  Send XML and get your client to do the transform

Option 2 only really an option if you the tools and the control over the 
server to implement it.

Option 3 if you were generating large content with buffering turned off 
transformNodeToObject is pretty effecient, with transformNode and 
Response.Write you are going to use more memory and will need a buffer size 
big enough to handle the result (or slice up the result).  You will also 
need to consider encoding, where ToObject would have encoded to CharSet 
transformNode always returns unicode.  Hence the best approach would be to 
set Response.CharSet = "UTF-8" (you were doing that already right?) and 
Response.CodePage = 65001.  On 2000 SP4 with IIS5 this gets trickier still 
because the Response object doesn't have a CodePage property, you would need 
to do it on the session then set the codepage back to its original value 
after the Write.

Option 4 is well worthwhile if you can stand the upheaval but for new code 
its worth considering.


-- 
Anthony Jones - MVP ASP/ASP.NET 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent