I'm uploading multiple files using FtpWebRequest.
But for every file I'm opening and closing a connection.
How can I upload multiple files using the same connection?
Like a ftp client application, connect using username and password, change directory, upload file1, upload file2, upload file3, disconnect.
To transfer files to another computer, open an FTP connection to that computer. To move files from the current directory of your computer, use the mput command. The asterisk ( * ) is a wildcard that tells FTP to match all files starting with my . You can also use a question mark ( ? ) to match a single letter.
Setting up automatic FTP scheduling is as easy as right-clicking on the folder or directory you want to schedule, and clicking Schedule. In the Task Scheduler section you'll be able to name the task, and set a date and time for the transfer to occur.
FTP has long been used to exchange files between computers on a network, but it's burdened by enough security issues that browser makers are dropping support for the protocol because the exchange happens without encrypting data in transit between two points.
The default value of FtpWebRequest.KeepAlive is true. Are you explicitly setting KeepAlive to false?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With