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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom Shelton

    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]
  • David M. Taylor

    #2
    RE: XmlTextReader constructor hangs (only on 1.1 SP1)...

    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:
    [color=blue]
    > 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]
    >[/color]

    Comment

    • Tom Shelton

      #3
      Re: XmlTextReader constructor hangs (only on 1.1 SP1)...

      On Wed, 8 Sep 2004 16:47:12 -0700, David M. Taylor wrote:
      [color=blue]
      > 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.
      >
      >[/color]

      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]

      Comment

      • oscarl@hotmail.com

        #4
        Re: XmlTextReader constructor hangs (only on 1.1 SP1)...

        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);
        }
        }

        Comment

        • oscarl@hotmail.com

          #5
          Re: XmlTextReader constructor hangs (only on 1.1 SP1)...

          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);
          }
          }

          Comment

          Working...