I\'m trying to get an image from an url using a byte stream. But i get this error message:
This stream does not support seek operations.<
You can't reliably ask an HTTP connection for its length. It's possible to get the server to send you the length in advance, but (a) that header is often missing and (b) it's not guaranteed to be correct.
Instead you should:
byte[] that you pass to the Stream.Read methodListList.AddRange to append the contents of your fixed-length buffer onto your byte listNote that the last call to Read will return fewer than the full number of bytes you asked for. Make sure you only append that number of bytes onto your List and not the whole byte[], or you'll get garbage at the end of your list.