473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Heads up, Update 955069 breaks transformNodeToObject in ASP

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

Nov 12 '08 #1
3 4415
"Anthony Jones" wrote:
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

Hi Anthony,

Thanks for your help on all this. All the pages in my web site show the
error that was not there before. Check it out. www.markallenonline.com

I have a classic ASP web site and most of the pages use something like this

Dim objXML1
Dim objXSL
Set objXML1 = Server.CreateObject("Microsoft.XMLDOM")
Set objXSL = getXMLDoc("default.xsl")
call objXML1.transformNodetoobject(objXSL, Response)

I am tempted to uninstall the security update (Workaround 1) if I can.
However I would be willing to implement the wrapper you mentioned (workaround
2). If it worked. I would do the coding. Every page unfortunately. Could help
me with some sample code for this. It would be appreciated.

Workaround 3 I tried however, my web site works in three languages and when
I do the transform to an intermediate object document and then do
Response.Write I then loose all special foreign characters somehow. If I
transform right to the response object the special characters in German and
Spanish show correctly and works great.

Workaround 4 is not an option for me.

Again thanks for the help. I was waiting for something like this to happen
with all the automatic updates.

Luis Vargas

Nov 15 '08 #2

"Luis Vargas" <Luis Va****@discussions.microsoft.comwrote in message
news:AB**********************************@microsof t.com...
"Anthony Jones" wrote:
>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.

Hi Anthony,

Thanks for your help on all this. All the pages in my web site show the
error that was not there before. Check it out. www.markallenonline.com

I have a classic ASP web site and most of the pages use something like
this

Dim objXML1
Dim objXSL
Set objXML1 = Server.CreateObject("Microsoft.XMLDOM")
Set objXSL = getXMLDoc("default.xsl")
call objXML1.transformNodetoobject(objXSL, Response)

I am tempted to uninstall the security update (Workaround 1) if I can.
However I would be willing to implement the wrapper you mentioned
(workaround
2). If it worked. I would do the coding. Every page unfortunately. Could
help
me with some sample code for this. It would be appreciated.

Workaround 3 I tried however, my web site works in three languages and
when
I do the transform to an intermediate object document and then do
Response.Write I then loose all special foreign characters somehow. If I
transform right to the response object the special characters in German
and
Spanish show correctly and works great.

Workaround 4 is not an option for me.

Again thanks for the help. I was waiting for something like this to happen
with all the automatic updates.
Response.CodePage = 65001
Response.CharSet = "UTF-8"
Response.Write objXML1.transformNode(objXSL)

This code should work for all characters.

Does the above not work for you?
Can you provide an example characters you are having trouble with?

--
Anthony Jones - MVP ASP/ASP.NET

Nov 15 '08 #3


"Anthony Jones" wrote:
>
"Luis Vargas" <Luis Va****@discussions.microsoft.comwrote in message
news:AB**********************************@microsof t.com...
"Anthony Jones" wrote:
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.
Hi Anthony,

Thanks for your help on all this. All the pages in my web site show the
error that was not there before. Check it out. www.markallenonline.com

I have a classic ASP web site and most of the pages use something like
this

Dim objXML1
Dim objXSL
Set objXML1 = Server.CreateObject("Microsoft.XMLDOM")
Set objXSL = getXMLDoc("default.xsl")
call objXML1.transformNodetoobject(objXSL, Response)

I am tempted to uninstall the security update (Workaround 1) if I can.
However I would be willing to implement the wrapper you mentioned
(workaround
2). If it worked. I would do the coding. Every page unfortunately. Could
help
me with some sample code for this. It would be appreciated.

Workaround 3 I tried however, my web site works in three languages and
when
I do the transform to an intermediate object document and then do
Response.Write I then loose all special foreign characters somehow. If I
transform right to the response object the special characters in German
and
Spanish show correctly and works great.

Workaround 4 is not an option for me.

Again thanks for the help. I was waiting for something like this to happen
with all the automatic updates.

Response.CodePage = 65001
Response.CharSet = "UTF-8"
Response.Write objXML1.transformNode(objXSL)

This code should work for all characters.

Does the above not work for you?
Can you provide an example characters you are having trouble with?

--
Anthony Jones - MVP ASP/ASP.NET

Hi Anthony,

Thanks for that. Changing the code page did it. Now characters like © or
the spanish Ñ show up correctly. I had the Response.charset set to UTF-8
already.

Now I just have to change all the pages.

Thanks

Luis Vargas
Nov 15 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Syndrake | last post by:
I can confirm that this also happened to me this morning: Installed updates via Automatic Updates, reboot, IIS stops serving .aspx pages with "Server Application Unavailable" error. I'm running XP...
1
by: Chris | last post by:
Has anyone ever accomplished a mass update off all databases, tables and columns for collation? If I try to change the collation/character set for the mysql daemon it breaks all of our queries...
27
by: VK | last post by:
<http://www.jibbering.com/faq/#FAQ3_2> The parts where update, replacement or add-on is needed are in <update> tag. 3.2 What online resources are available? Javascript FAQ sites, please...
0
by: Darryl Kerkeslager | last post by:
Access 2002 on Win98 at least, not tested elsewhere: Bug: The ListCount property of an unbound listbox may be incorrect if you use column heads. Model: Set up a simple database with two...
1
by: Jason Shohet | last post by:
What we've done so far in our web applications: 1. We have no datasets dragged-and-dropped in Visual Studio. They are all defined in the code, generated at runtime. 2. when a user updates or...
3
by: LP | last post by:
Hello, In the past I used SqlCommandBuilder and SqlDataAdapter .Update method to apply changes in a DataTable back to its table source in SQL Server. It worked fine when DataSet had only 1...
1
by: Nathan | last post by:
Hi, I want to change a field in a database directly using an update command, not by changing a dataset first and then updating. I'm trying to use a command similar to this: ...
2
by: mtugnoli | last post by:
I've found a sample on http://msdn2.microsoft.com/en-us/library/ms766561.aspx to filter a .XML ex. <?xml version="1.0"?> <COLLECTION dateCreated="01-04-2000"> <BOOK> <TITLE>Splish...
6
by: Anthony Jones | last post by:
People, Anyone else got an IIS7 server out there that they can test this little ASP file:- <% Set xml = Server.CreateObject("MSXML2.DOMDocument.3.0") xml.loadXML "<root />" Set xsl =...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.