"byteCount" error when threading WebClient.OpenRead

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.
 
J

JS

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top