calling UploadFile for large file got exception with message "You cannot modify the position of a FtpDataStream. This property is updated as data is read or written to the stream."
See original GitHub issueFTP OS: not sure, probably Unix, the server is provided by GoDaddy: https://en.wikipedia.org/wiki/GoDaddy
FTP Server: not sure
Computer OS: ? Windows 7
<write details about your bug report / feature request here> I try to upload a big file (about 1.5GB) by FtpClient.UploadFile, but it always throws exception with the message: “You cannot modify the position of a FtpDataStream. This property is updated as data is read or written to the stream.” Tried to use FileZilla to upload such large file and it worked fine.
Small files can be uploaded (tried with files that are less than 500KB) normally by FtpClient.UploadFile
Logs :
<paste logs here but DO NOT delete the lines above and below this line>
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
FTP connection dropped when uploading file in chunks
(You cannot modify the position of a FtpDataStream. This property is updated as data is read or written to the stream.) System.IO.
Read more >Exception"You cannot modify the position of a ...
InvalidOperationException : You cannot modify the position of a FtpDataStream. This property is updated as data is read or written to the stream....
Read more >Timed out trying to read data from the socket stream! #122
Append I get a "You cannot modify the position of a FtpDataStream. This property is updated as data is read or written to...
Read more >Alternative FTP failure? - Developer
While testing I've found that the AlternativeFTP/FluentFTP is failing on the verify portion within the PutAsync method.
Read more >Single file operations - Rebex SFTP - Rebex.NET
Single-file upload and download. Use PutFile method to upload a single file, and GetFile method to download it. Both methods require a target...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I too am encountering this issue while being connected to FileZilla Server, but the error is not limited to just that server. It doesn’t happen all the time, but I have tracked down the top-level reason.
FluentFTP/Client/FtpClient_HighLevelUpload.cs line 1003 shows
OpenAppend (FluentFTP/Client/FtpClient_LowLevel.cs line 1526) in turn calls OpenDataStream (FluentFTP/Client/FtpClient_LowLevel.cs line 810) which in turn calls OpenPassiveDataStream (FluentFTP/Client/FtpClient_LowLevel.cs line 306) or OpenActiveDataStream (FluentFTP/Client/FtpClient_LowLevel.cs line 578). Both OpenPassiveDataStream and OpenActiveDataStream return FtpDataStream instances.
/FluentFTP/Stream/FtpDataStream.cs line 54 shows
This error occurs only when a socket error of 10054 occurring during a resumed upload. (FluentFTP/Client/FtpClient_HighLevelUpload.cs line 994).
I have encountered the same problem using a FileZilla server.