AspNetCore.Docs/aspnet/web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequ...

1.6 KiB

title author description ms.author manager ms.date ms.topic ms.assetid ms.technology ms.prod msc.legacyurl msc.type
[How Do I:] Use the FtpWebRequest Class to Create an FTP Connection to a FTP Server | Microsoft Docs rick-anderson In this video Chris Pels shows how to use the FtpWebRequest class to create an FTP connection and transfer a file. First, create a simple .aspx form to selec... aspnetcontent wpickett 12/18/2008 article 99a0394d-96aa-445c-a338-43961cc717e8 dotnet-webforms .net-framework /web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server video

[How Do I:] Use the FtpWebRequest Class to Create an FTP Connection to a FTP Server

by Chris Pels

In this video Chris Pels shows how to use the FtpWebRequest class to create an FTP connection and transfer a file. First, create a simple .aspx form to select a file to transfer to the FTP server. Next, see the essential methods and properties of the FtpWebRequest class that need to be configured in order to establish an FTP connection. Then, see how to get the local file contents so the file can be transferred using a StreamReader and a StreamWriter to write it to the FtpWebRequest. Finally, a FtpWebResponse is obtained to determine the outcome of the transfer. This approach can be used to programmatically transfer files for a web application.

▶ Watch video (21 minutes)