.NET 1.1 Breaks ChainStream
Well we have been working hard on converting our 1.0 code base to 1.1. We keep running into little things that are breaking our code though. The latest is a breaking change in ChainStream. We had a compression stream that we were running on top of our web services. In .NET 1.1 some new code (SoapServerProtocolHelper) was introduced that attempts to seek the stream closest to .NET without checking the CanSeek property. Essentially what this means is that whereas non-seekable streams were legal in 1.0 they are no longer legal in 1.1. Kind of kills some of the utility of ChainStream since it means that you pretty much have to buffer the whole request or figure out how to just buffer some of the envelope so you can seek back when requested. Here is the disassembly courtesy of Anakrino:
internal static SoapServerProtocolHelper GetHelper(SoapServerProtocol protocol) {
SoapServerMessage local0;
long local1;
XmlTextReader local2;
string local3;
SoapServerProtocolHelper local4;
local0 = protocol.Message;
local1 = local0.Stream.Position;
local2 = SoapServerProtocolHelper.GetXmlTextReader(local0.ContentType, local0.Stream);
local2.MoveToContent();
local3 = local2.NamespaceURI;
local4 = SoapServerProtocolHelper.GetHelper(protocol, local3);
local0.Stream.Position = local1;
return local4;
}
The killers are the lines that attempt to set the position...
9:45:04 AM
|