Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

timed out trying to read data from the socket stream

$
0
0

Hi,
i want upload files whit ftp to an other server but when i use these codes ,
its created file in host but the size of file is 0 bytes and return error

   public async Task<IActionResult> Create( IFormFile file)
{
FtpClient client = new FtpClient("144.76.30.231"); client.Credentials = new NetworkCredential("yavarani", "*********"); client.Connect(); using (var stream = new StreamReader(file.OpenReadStream())) { client.UploadAsync(stream.BaseStream, "/yavarani/yavaraniha.ir/wwwroot/Files/Videos/" + aVF.FileNameOrLink).Wait(); }
}

Error : 
timed out trying to read data from the socket stream
 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>