473,831 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlTextReader constructor hangs (only on 1.1 SP1)...

Problem: XmlTextReader Constructor hangs until underlying socket closes
when passed a NetworkStream.

Example:

Dim reader As New XmlTextReader (New NetworkStream(s , False))
I can positively confirm by the way that this only happens AFTER
installation of SP1 for framework 1.1. So, has anyone else have this
issue? I was able to recreate this on 3 different boxes (All windows
XP, 2 with SP2 and 1 without). Everytime, our custom dataprovider hangs
on that line of code. The code is actually in C#, but I don't think
that makes a difference :) What I do know is that this provider has
been working for several months now for several months - pre SP1.

Anyone experience this issue with SP1? Anyone know of a work around?
Other then rewriting our dataprovider :)

This is sort of a big issue, since SP1 is on windows update - and I'm
sure were going to get several customers calling in with this problem
over the next few days. Fortunately, we found that uninstalling the
runtime and reinstalling the old version makes everything work again,
but we would rather find a permanent fix if there is one...

--
Tom Shelton [MVP]
Nov 21 '05 #1
4 1276
The same issue is documented on:
microsoft.publi c.dotnet.xml
Subject: Reading XML from Stream - Change with .NET 1.1 SP1?

No answers yet.
"Tom Shelton" wrote:
Problem: XmlTextReader Constructor hangs until underlying socket closes
when passed a NetworkStream.

Example:

Dim reader As New XmlTextReader (New NetworkStream(s , False))
I can positively confirm by the way that this only happens AFTER
installation of SP1 for framework 1.1. So, has anyone else have this
issue? I was able to recreate this on 3 different boxes (All windows
XP, 2 with SP2 and 1 without). Everytime, our custom dataprovider hangs
on that line of code. The code is actually in C#, but I don't think
that makes a difference :) What I do know is that this provider has
been working for several months now for several months - pre SP1.

Anyone experience this issue with SP1? Anyone know of a work around?
Other then rewriting our dataprovider :)

This is sort of a big issue, since SP1 is on windows update - and I'm
sure were going to get several customers calling in with this problem
over the next few days. Fortunately, we found that uninstalling the
runtime and reinstalling the old version makes everything work again,
but we would rather find a permanent fix if there is one...

--
Tom Shelton [MVP]

Nov 21 '05 #2
On Wed, 8 Sep 2004 16:47:12 -0700, David M. Taylor wrote:
The same issue is documented on:
microsoft.publi c.dotnet.xml
Subject: Reading XML from Stream - Change with .NET 1.1 SP1?

No answers yet.


Well, it looks like were not the only ones with this problem... For now -
were going to tell our customers NOT to update to SP1. There is just too
much functionality that is broken by this problem.

--
Tom Shelton [MVP]
Nov 21 '05 #3
There is a bug with .NET SP 1.1 using XmlTextReader with networkStream.

It works for me:

MemoryStream ms = new MemoryStream();

StreamReader sr = new StreamReader(ns );

if (ns.DataAvailab le)
{
char[] b = new char[512];
int nread = sr.Read(b, 0, 512);

ms.Write(System .Text.Encoding. ASCII.GetBytes( b, 0, nread), 0, nread);
ms.Seek(0, System.IO.SeekO rigin.Begin);

XmlTextReader reader = new XmlTextReader(m s);
if (reader.Read())
{
objXmlDocument. Load(reader);
}
}

Nov 21 '05 #4
There is a bug with .NET SP 1.1 using XmlTextReader with networkStream.

It works for me:

MemoryStream ms = new MemoryStream();

StreamReader sr = new StreamReader(ns );

if (ns.DataAvailab le)
{
char[] b = new char[512];
int nread = sr.Read(b, 0, 512);

ms.Write(System .Text.Encoding. ASCII.GetBytes( b, 0, nread), 0, nread);
ms.Seek(0, System.IO.SeekO rigin.Begin);

XmlTextReader reader = new XmlTextReader(m s);
if (reader.Read())
{
objXmlDocument. Load(reader);
}
}

Nov 21 '05 #5

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

Similar topics

0
1687
by: Stelrad Doulton | last post by:
Hi all, I am writting a Jabber-esque client-server application and have run into an issue with the XmlTextReader constructor when passing a NetworkStream - It hangs forever, apparently this is an issue with SP1. Anyway I have the code below as a work around (using bool keepalives as it must run on the CF): while(keepAlive)
2
1723
by: Stephen Gutknecht \(RoundSparrow\) | last post by:
XmlTextReader against a stream no longer works. This breaks the open source jabber-net and other software. Several people have confirmed that what works on dotNet 1.1 fails on dotNet 1.1 SP1. So far, no work around nor hotfix has been found. If you use XML against a stream, make sure you test before advising upgrades to SP1. For details, read the following: newsgroup: microsoft.public.dotnet.xml Thread subject: "Reading XML from...
2
4170
by: Yuriy | last post by:
Hi, any ideas how to read XML fragment from TextReader? XmlTextReader constructor accepts only Stream or string as source Do I miss something? thanks Yuriy
2
3667
by: ecomputerdelicacy | last post by:
Compact Framework SP3 (and I think also SP2 and SP1) XmlTextReader does not handle !DOCTYPE and (maybe?) rdf elements. How can I get the XmlTextReader to read these without issuing a NotSupportedException? Or at least to get past these elements (and nested elements) with an Skip()? I've tried setting xtr.XmlResolver = null; but it doesn't change the functionality. I'm still getting the exception. In a recent MSDN MVP Chat, I was pointed...
1
2257
by: SHC | last post by:
Hi all, I did the "Build" on the attached code in my VC++ .NET 2003 - Windows XP Pro PC. On the c:\ screen, I got the following: Microsoft Development Environment An unhandled exception of type 'System.Xml.XmlException' occured in system.xml.dll Addtional Information: System error |Break| |Continue| I clicked on the |Continue| and I got the following: "c:\Documents and Settings\Scott H. Chang\My Documents\Visual Studio...
3
1963
by: Kurt Biesemans | last post by:
Hello, I have a line code : StackTrace stackTrace = new StackTrace(false); When I run the project in debug, the application keeps hanging on this line. My Environment: Windows 2003 Server Standard SP1 Visual Studio 2003 SP1 Any help is welcome
10
1964
by: Tomas Vera | last post by:
Hello All, I'ma having trouble getting GetCurrentProcess() to work properly. What I'm trying to accomplish is list all running processes. But my call get GetProcesses() hangs. While testing things out I found that the tiny program listed below hangs as well. Am I missing something?
13
3281
by: Rick | last post by:
The following code will enter an infinate loop when in ReadChars. I can only make it happen when reading a Stream and with this particular XML. If I use the ReadInnerXml call rather than my own ReadElementBodyAsXml the code works, but is less efficent. ReadElementBodyAsXml is required by my application with .Net Framework 1.1. The code breaks on the second call to ReadElementBodyAsXml with the inner xml: </EGDConfigExtension>...
2
2696
by: Pierre Rouleau | last post by:
Hi all, I have a consistent test case where os.popen3() hangs in Windows. The system hangs when retrieving the lines from the child process stdout. I know there were several reports related to os.popen3() hanging under Windows in this group before. I stumbled on a case where a piece of code works in some occasions and hangs consistently given different data. It performs exactly the same on 3 different computers running Windows:
0
9793
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10534
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9317
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7748
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3964
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.