.NET Winforms c# Upload large files -


I get this error when the file length exceeds 18 mb:

< Em> Stream does not support concurrent IO read or write tasks

Error in this section is local:

  requestStream.Write ( Header, 0, Header. Lang); If (fileData! = Null) {// write the file data, if any byte [] buffer = new byte [checked ((UIT) monastery (min. 8192, (int file.data lang))]; Int bytes read; Try {while (bytes read = fileData.read (buffer, 0, buffer, langhout))! = 0) {// 3000 throws the exception after an incomplete request stream. Write (buffer, 0, bytes read); }} Hold (exception before) {string aux = ex.Message; }} // write the footer request section. Write (footer, 0, footer. Length); Return webrequest Gatorresons ();  

I tried with lock sentence, sendChunked = true and current streaming = false But I can not upload files properly

Thank you in advance

Perhaps the web server sends an error message (read) that the size limit has exceeded, while the loop tries to upload the stream (write) data. You can try to check the sent between the server and the program with virus hack or any other network snippet.


Comments