We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when I connect to FTP server it connect to high port (50000+) and stuck when OpenFileReadStreamAsync after login
using (var ftpClient = new FtpClient(new FtpClientConfiguration { Host = PrPath, Username = ftpLogin, Password = ftpLogin, BaseDirectory = baseDirectory, SslProtocols = System.Security.Authentication.SslProtocols.None, })) { var fileinfo = new FileInfo(localpath); Console.WriteLine("login"); await ftpClient.LoginAsync(); Console.WriteLine("after login"); byte[] existsData; try { using (var readStream = await ftpClient.OpenFileReadStreamAsync(fileUpload)) { Console.WriteLine("read remote"); existsData = ReadToEnd(readStream); readStream.Dispose(); Console.WriteLine("after read remote"); } } catch (Exception readException) { Console.WriteLine("first exception"); Console.WriteLine(readException.Message); existsData = null; } using (var writeStream = await ftpClient.OpenFileWriteStreamAsync(fileUpload)) { Console.WriteLine("write stream"); var fileReadStream = fileinfo.OpenRead(); if (existsData != null) { var existReadStream = new MemoryStream(existsData); await existReadStream.CopyToAsync(writeStream); } await fileReadStream.CopyToAsync(writeStream); writeStream.Dispose(); fileReadStream.Dispose(); Console.WriteLine("after write stream"); } ftpClient.Dispose(); System.IO.File.Delete(localpath); } } catch (Exception ex) { Console.WriteLine(ex.Message); } return 1;
it throw a connection attempt fail at XXX.XXX.XXX.XXX:51320 (high port) how can I fix this thank you
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when I connect to FTP server it connect to high port (50000+) and stuck when OpenFileReadStreamAsync after login
it throw a connection attempt fail at XXX.XXX.XXX.XXX:51320 (high port) how can I fix this thank you
The text was updated successfully, but these errors were encountered: