"byteCount" error when threading WebClient.OpenRead

  • Thread starter Thread starter JS
  • Start date Start date
J

JS

Has anyone encountered the error:
"Non-negative number required.
Parameter name: byteCount"

When threading and executing the WebClient.OpenRead method? I do not
encounter the error when I execute the threaded calls in a linear
fashion.
 
To add...

StackTrace:

" at System.Text.UTF8Encoding.GetChars(Byte[] bytes, Int32 byteIndex,
Int32 byteCount, Char[] chars, Int32 charIndex, UTF8Decoder decoder)
at System.Text.UTF8Decoder.GetChars(Byte[] bytes, Int32 byteIndex,
Int32 byteCount, Char[] chars, Int32 charIndex)
at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32
userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32
count)
at System.IO.StreamReader.ReadToEnd()
at JBPS.JBFeeder.Remote.GetHTTPData() in
C:\JBCode\JBFeeder\Code\Current\JBPS.JBFeeder.Utilities\Remote.vb:line
629"
 
Back
Top