Microsoft KB Archive/327266

= BUG: BinaryReader.PeekChar on a ResponseStream Always Returns -1 =

Article ID: 327266

Article Last Modified on 10/22/2003

-

APPLIES TO


 * Microsoft .NET Framework 1.0
 * Microsoft .NET Framework 1.1
 * Microsoft Platform Software Development Kit-January 2000 Edition
 * Microsoft .NET Framework Class Libraries 1.0
 * Microsoft .NET Framework Class Libraries 1.1

-



This article was previously published under Q327266



SYMPTOMS
The BinaryReader.PeekChar method always returns -1 on the binary response stream that is returned from HttpWebResponse.GetResponseStream.



CAUSE
BinaryReader.PeekChar returns the next available character, or returns -1 if no more characters are available or if the stream does not support seeking.

Because the data stream that is returned by HttpWebResponse.GetResponseStream does not support seeking, PeekChar always returns -1 on this stream.



STATUS
This behavior is by design.

Keywords: kbbug kbkernbase kbpending kbfileio KB327266

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.