--- title: "[How Do I:] Use the FtpWebRequest Class to Create an FTP Connection to a FTP Server | Microsoft Docs" author: rick-anderson description: "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..." ms.author: aspnetcontent manager: wpickett ms.date: 12/18/2008 ms.topic: article ms.assetid: 99a0394d-96aa-445c-a338-43961cc717e8 ms.technology: dotnet-webforms ms.prod: .net-framework msc.legacyurl: /web-forms/videos/how-do-i/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server msc.type: video --- [How Do I:] Use the FtpWebRequest Class to Create an FTP Connection to a FTP Server ==================== by [Chris Pels](https://twitter.com/chrispels) 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)](https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/how-do-i-use-the-ftpwebrequest-class-to-create-an-ftp-connection-to-a-ftp-server)