I ran into the same problem, but to upload the file to ftpWriter.Close (). Also, I was unable to execute GetRequestStream after a successful PrinWorkingDirectory, for example.
The problem seems to be in the message “Waiting: 100-Continue” - until I have completely verified this, the problem is somewhere there.
I tried every solution I found on the Internet: changing KeepAlive to true, adding to App.Config file
<system.net> <settings> <servicePointManager expect100Continue="false"/> <httpWebRequest useUnsafeHeaderParsing="true"/> </settings> </system.net>
Nothing succeeded.
I spent a lot of time and tried various other third-party libraries (I did not like the idea too much) until, finally, I came to a code that used the same classes and methods, but it works! After analyzing the code, I finally realized: the code was for the .NET Framework 2.0, while my code was for the .NET Framework 4.5. It seems that Microsoft made a small mistake when switching from Framework 3.5 to Framework 4.
Since this is not a solution for converting your new projects to targeting the old environment, you can create dlls for FTP operations by pointing to 3.5.NET Framework or you can use third-party libraries.
I may be a little late, but in the future this will probably help other frustrated developers in this matter.
source share