0

I am using FtpWebRequest, asyn method to upload files, but when I try to break the network(like Network cable unplugged), the file transfered part(maybe 20%) in win ftp server is uncountable size(cannot get size), so I can't resume this upload.

But when i try to reupload again call the: Request.EndGetRequestStream(ar), it has an exception and the file part in server is countable again.

I think maybe some stream.close() issues cause the problem.

My question is how to resume upload when the network is reconnected? Thanks!


After I split filestream to upload seperately(close requeststream every split), still find the file was locked by win server IIS after network breaks.

Any suggustion?

Kamil
  • 594
  • 1
  • 8
  • 28
  • Your issue is not related to any programming language. How would you resume an FTP session anyway? – PepitoSh Jun 26 '18 at 04:12
  • @PepitoSh the problem is if I disconnect the internet by disable the network adapter(or similar way), server don't reserve any bytes that has been transmited previously. I don't want resume the session, I just want to reserve previous transmited bytes. – Kamil Jun 26 '18 at 06:00
  • Re session, my point exactly. You have to start over. On the other hand what the server remembers of a partially uploaded file really depends on the FTP server implementation. Whether it supports appending to an existing file, also implementation specific. – PepitoSh Jun 26 '18 at 06:18
  • @PepitoSh hi, I update my post, any suggestion? – Kamil Jun 26 '18 at 11:48

0 Answers0