Click here to Skip to main content
15,893,266 members
Everything / FTP

FTP

FTP

Great Reads

by deangi
DIY GPS Location Tracker
by Sergio Andrés Gutiérrez Rojas
Easy FTP Upload without files size limit
by Member 12032084
.dll for making the FTP management with VB.NET easier
by DiponRoy
Using SFTP/FTP in ASP.NET CORE projects

Latest Articles

by deangi
IoT data edge hub is designed for remote low power unattended applications. IoT devices can post data to the Hub which will store the data and make it available for later download to core servers. Design is based on a low cost ESP32 platform with an attached SD card.
by deangi
Monitoring AC loads with CT sensors
by deangi
DIY GPS Location Tracker
by DiponRoy
How to run FTP, SFTP, SMTP, Cache, LDAP, SSO and other servers in Docker

All Articles

Sort by Updated

FTP 

11 Feb 2018 by #realJSOP
There is no need to use MFC from C#. Here's a link that describes the FtpWebRequest object. MSDN Docs for FtpWebRequest [^] Furthermore, there are numerous C# FTP classes, many of which are posted as articles right here on CodeProject. EDIT================================= Look at this Q/A...
4 Apr 2018 by #realJSOP
Try setting the ftpwebrequest.timeout value to -1 (unlimited). The MS docs say it's set to that, but it's actually set to 100000 (100 seconds).
16 Sep 2014 by @BangIndia
hi.i try to use the ftp commands in c++.Its throwing the error as 997.. "Overlapped I/O operation is in progress".Code:HINTERNET hHandle = InternetOpen("s", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_ASYNC); if( hHandle != NULL...
22 Jan 2013 by @BangIndia
HINTERNET hHandle = InternetOpen("SapphireBackup", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_FROM_CACHE); if( hHandle != NULL ) { printf("Success"); } HINTERNET hFtpSession = InternetConnect( hHandle, "172.133.12.33", INTERNET_DEFAULT_FTP_PORT, "c:\\test11233",...
16 Sep 2014 by @BangIndia
HINTERNET hHandle = InternetOpen("s", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0)Specify the last parameter to InternetOpen() as 0 and in FtpCreateDirectory() use forward slash("/") instead of back slash("\") as a path separator .
23 Nov 2012 by A.J Bosch
Hi there I need Urgent help please I am trying to connect to a FTP server but it bombs out at mFTPClient = new FTPClient();with this error when I mouse over FTPClient(); Quote:Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.I Have...
14 Feb 2012 by AAMERSAEED
Dear,You are using "Sample.txt" at the end try using "Sample.xml"thanks,Aamer.
22 Nov 2015 by aarif moh shaikh
Try this..string CompleteDPath = "ftp://192.168.1.1:3113/YourFolderName/" + filephoto; string UName = "FTP UserName"; string PWD = "FTP Password"; //Filepath = CompleteDPath + MATBR + "/M_" + DIST + "_" + schlcode + "_lot_" +...
15 Jan 2014 by abdulsafran
Below is my C# code in ASP.NET to upload images in to the FTP. My problems is:protected void UploadButton_Click(object sender, EventArgs e){ if (FileUploadControl.HasFile) { try { if...
27 Mar 2013 by Abhinav S
There are a number of free thierd party tools / articles that will help you achieve this -Simple C# FTP Class[^]Simple FTP library in C#[^]http://ftplib.codeplex.com/[^]
22 May 2014 by Abhinav S
Tryhttp://www.pcmag.com/article2/0,2817,543509,00.asp[^]http://kb.siteground.com/ftp_browser/[^]
28 Feb 2012 by Abhineet Ayan Verma
Hi All,I have written a simple FTP Client-Server Code using Winsocks. Now I want to implement a simple Username-Password Authentication but after going through MSDN Authentication Links, I am very confused. Can you suggest some simple APIs for the same. Any help will be appreciated.
1 Mar 2012 by Abhineet Ayan Verma
Hi All,Can anyone tell me: "How To Construct A Header?" I am writing a FTP Client-Server Code. And I want to construct a Header for the data packets I have to send to server with information like the size of my data,etc.Any pointers towards sample/example code would be...
7 Mar 2012 by Abhineet Ayan Verma
Hi All,I am writing a code to implement FTP Client-Server which have the methods for 1. Client Username-Password Authentication.2. Downloading A File.3. Uploading A File.Now the steps in which my code should work is:A. Server keeps in memory the Username-Password Pair.B. Each...
22 Dec 2012 by Abhishek Pant
How to: Upload Files with FTP[^]and have a look at these threadsCatching a Socket Exception in C#[^]and where is your catch/finally part of the exception handling
27 Dec 2012 by Adam R Harris
Take a look at this:http://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Upload-file-to-FTP-Server.html[^]*** EDIT ***There is also a article written here with a class you can use Simple C# FTP Class[^]
11 Aug 2014 by adeelIdealist
I can easily upload files with ftp protocol using inet control in vb6. But with http protocol, I'm getting an error "unable to complete request". And I am not sure if my server supports http upload. Any help plz
18 Nov 2014 by Afzaal Ahmad Zeeshan
You should generally just Google[^] for source codes or articles. The following would help you out in creating a File Transfer Protocol server. Creating an FTP Server in C# - with IPv6 Support[^]Secondly, read System.Net namespace, to learn more about networking and read about...
24 Sep 2014 by Alamgir Nasir
I have a .net C# service that creates a file automatically. How do I automatically upload the file to a web server? No idea how the web works, would be great if someone can point me in the right direction.
28 Sep 2015 by AlbertGoico
i understand, but how preview a image file with ftp, the ftp directory is a protectect, not have access with the browser...
21 Nov 2016 by AlexF185
I'm having a problem downloading zip files from a sub-dir of an ftp site. It works with any other file type even if the sub-dir has spaces.If the sub-dir has no spaces the zip file works fine too.The Exception is "The remote server returned an error: (550) File unavailable (e.g., file...
22 Jan 2015 by AlwaysLearningNewStuff
INTRODUCTION AND RELEVANT INFORMATION:I am an inexperienced C# developer that inherited colleague's project ( C#, .NET 3.5, Windows Mobile 6.5) and was tasked to fix certain bugs.One of the tasks was to switch application to offline mode if Internet connection is unavailable. My...
25 Nov 2014 by amiach
Greeting all , I'm trying to upload directories and files from my computer to a server via ftp and filezilla with c# , winforms application . Here is my code , I have an error that I can't solve it : ////INST : liste des directories Sources ...
2 Oct 2012 by amir tarek
I want to make my ftp server over the interneti made it on Debian linux computerand i changed the port of it to 201my local ip is 192.168.1.3so i can access it from any computer on my network through ftp://mylocalip:201it appear to me the login page i login with my linux user...
29 Aug 2012 by AmitGajjar
Hi,Length property should not called for the directory. if you call FI.Length for directory it will gives you FileNotFoundException.Refer MSDN for FileInfo.Length[^]Thanks-Amit Gajjar
3 Aug 2014 by Amogh Natu
I'm working on a scenario wherein I need to move some files from one FTP location to another. The FTP server is the same but credentials for the source and destination are different.For example,I need to copy filesFROM"ftp://sampleftp.com/sourceFolder" with login credentials...
16 Nov 2023 by Andre Oosthuizen
Quote: 1) Where should I put the file that I want users to be able to download? You should store downloadable files in a directory that is not directly accessible from the web. In a 'Blazor' app, you should normally create the folder named...
4 Nov 2011 by andreyakub
I've written a small windows service application that periodically checks an ftp site in the local network for new files and downloads them to a local folder. For this, I've used the basic FTP functionality that is provided in the .net library. But the problem that I've encountered is that some...
21 Dec 2012 by André Kraak
These two article might be useful.Advanced FTP Server[^] Creating an FTP Server in C# - with IPv6 Support[^]
9 Jul 2020 by AndyUK62
Hi there I have an issue I would love some help with please. I am writing an app which sends a database held on the PC to a server. The app is written in VB.net and the server uses Filezilla. There are approx. 380 files to transfer, mostly all...
28 Mar 2012 by angel94
I want to know weather can i download different backup files using FTP in same browser using different windows.For ex,If i have two backup files in my ftp which belongs to two dates .can i download at same time in different windows simultaneously.will it effect anywhere else. I mean...
26 Sep 2017 by ANIL AYDINALP
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input;...
16 Apr 2013 by Ankur\m/
As the as message says, you cannot list files from a FTP path.This might help: How to: List Directory Contents with FTP[^]
22 Mar 2015 by anthony Hung
Hello everyone.I'm trying to connect server using ftp c#.. when i compile my app. some computers can access and some other can't. at that time i got an error: " The remote server returned an error: 501 syntax error in parameters or arguments".I don't understand what are happening.Give...
15 Nov 2011 by ARBebopKid
I have looked for FTPS code/component via Google and haven't found one that I can get to work in my c# app.Does anyone have one they have personally used?
13 Jan 2012 by Arun Ashok
I am getting an error while i run the code below. This happens when only i run the exe on a Win XP machine. For WIN-7, it is working fine.private bool GetFileSize(FileInfo targetFI, long FileUploadedSize, string g_Subdivision,TMWaitDialog tmwaitdialog) { FtpWebRequest...
16 Jan 2012 by Arun Ashok
Hi All,The problem was not because of the permissions. The ftp site is having permissions for read/write etc.I scanned the ftp site with a virus scanner and, the code is working with both Win 7 and Win XP. So I searched for the root cause of the problem and I found that the, error is...
10 Apr 2013 by askquez
I am using ftplib for uploading files on ftp server using following codeFtpConnection ftp = new FtpConnection(serverip, ftpuser, ftppassword);ftp.Open();ftp.Login();ftp.SetCurrentDirectory("domain/wwwroot");void CreateDirOnFtp(string sDir, FtpConnection ftp) { ...
11 Oct 2013 by ASP.NET Community
FtpWebRequestThe FtpWebRequest class enables you to programatically create FTP connections to FTP Servers and transfer files.  If you are
11 Oct 2013 by ASP.NET Community
FtpWebRequest class to upload a file to ftp server (destination )This Function shows how to upload a file ftp server. this function simply return
2 Apr 2013 by Asp_Learner
How can I transfer files from one server http://abc.com to another server http://xyz.comI do have the passwords of both servers i.e. http://abc.com [source server] and destination server.
2 Apr 2013 by Asp_Learner
string CompleteDPath = ""; CompleteDPath = "ftp://1234.1234.12.13/"; string UName = ""; string PWD = ""; UName = "Administrator"; PWD = "12345"; WebRequest reqObj = WebRequest.Create(CompleteDPath +...
27 Jun 2012 by Ayush Swiss
string[] files ={ "UserList.csv", "Catalog.csv", "DeleteUser.csv" }; Sftp sftp = new Sftp(ftpServerIPAndPort, ftpUserName, decryptor(ftpPassword)); sftp.Connect(22); foreach (string filename in files) { ...
16 Feb 2016 by Balaram224
hi try this below code for upload file in FTP Server private void Upload144P_Click(object sender, EventArgs e) { OpenFileDialog fileobj = new OpenFileDialog(); fileobj.Filter = "Movie files (*.mp4)|*.mp4|Web Movie files (*.webm)|*.webm|All files...
10 Aug 2014 by bandayashoda
// Create a FTPCredentialsFtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(strFTPServer + "/" + strRemoteDirectory + "/");ftpRequest.Credentials = new NetworkCredential(strFTPUser, strFTPPassword);ftpRequest.Method = WebRequestMethods.Ftp.ListDirectory;// Associate the...
20 Apr 2016 by Bastien Vandamme
This is the first time I try to set up FTP folder with IIS. I try to understand the concept and the correct strategy to apply.First, I need to create several FTP access for different users. These users are complete different companies. I also need to give a read only access to all these FTP...
27 Apr 2016 by Ben J. Boyle
WinSCP has a .NET assembly and COM library that you can use in your projects. You just have to deploy the DLL and Executable as part installation. We've used it in a couple of different projects and had no problems with it.WinSCP .NET Assembly and COM Library :: WinSCP[^]
4 Aug 2016 by Bernhard Hiller
You need to URLEncode the special characters. In your case, use FtpWebRequest requestDir = (FtpWebRequest)FtpWebRequest.Create(new Uri(@"ftp://localhost/s/as%23"));
11 Aug 2015 by bindum31
Hi Sebastian,I had the same issue. Hope the following link may help you or someone to overcome the problem.Click here
18 Feb 2019 by Bloody Chicken
This program is designed to upload an XML file and a zip file automatically created to your FTP server. It can be used for software update.
7 Feb 2013 by bobb024
Hello,Currently I have an FTP process that grabs as many files that exist on the specific FTP file location and then pulls them down and downloads them. Based on specs changing instead of sending multiple files they are going to send one big file. Is there any suggestions on how to pull...
11 Feb 2013 by bobb024
Hey Everyone, looking for an example on downloading and uploading from FTPS site, any help would be great!
19 Mar 2015 by Brinda Lakhani
hello friends,I am developing a window application in c#.net. I want to delete only those file that was just uploaded to FTP server.
22 Sep 2014 by Bruno Terkaly
Recently, the team at DiscountASP.NET launched a new cloud hosting solution called EVERLEAP. Because EVERLEAP makes use of some Microsoft Azure technology I thought I’d take a look at it.
8 Dec 2019 by byQuince
using (Ftp client = new Ftp()) { client.ServerCertificateValidate += ValidateCertificate; client.ConnectSSL(Host); client.Login(Username, Password); client.Upload(filename, LocalDestinationFilename); } ...
5 Dec 2019 by byQuince
I am not having errors with the FileZilla server. I'm just getting an error in c #. When I run C # on another computer, it still works properly. The application is updating to ftp on computer A. But B is giving error on computer
10 Aug 2014 by CB Sharma
HelloFollow below linksAn FTP client library for .NET 2.0[^]https://go4answers.webhost4life.com/Example/downloading-files-directory-ftp-csharp-11808.aspx[^]
16 Jan 2013 by CHill60
Be very careful here - just because the batch file is physically stored on the server does not mean that you are executing the commands on that server!If you google for execute remote command windows you will get several links to ways of achieving this... here's a few ...Personally I use...
26 May 2022 by CHill60
Quote: If you set UsePassive to false, then you need to make sure that the port for the command channel is open (i.e., you need to define endpoints and access rules). Unless there is a good reason to not use passive, you are far better off using...
6 Dec 2018 by chimcham
Good Day. I would to ask on how can I do File Transfer from FTP A to FTP B using C#. Thank you. What I have tried: I am currently still reading articles and doing research.
26 Mar 2023 by chimcham
So I have this ftp upload, upload file from my local to ftp folder, but my problem is, I need to refresh the FTP Folder to view my uploaded file. Pls help. What I have tried: using System.Net; using System.IO; //Create FTP request FtpWebRequest request =...
16 Feb 2020 by cHl Security
I am trying to make a vbscript to upload files to remote ftp directory, after running the script and I check the directory, I discovered that the expected file didn't upload. I have been working arounf this for some hours now and I am unbale to...
16 Feb 2020 by cHl Security
It showed nothing. Id appreciate any form of diret assitance from you.
13 Feb 2012 by Christian Graus
Here is a list of properties you may like to set to see if they help you:request.Timeout = 10000request.ReadWriteTimeout = 10000request.KeepAlive = Falserequest.UseBinary = TrueNot saying these are the right settings, just that they are settings you should play with. I think the...
6 Aug 2013 by Code-Hunt
move-files-in-ftp-by-c[^]H...
9 Feb 2021 by Commish13
Hello,I'm having trouble ftp(ing) uploading a text file to the correct location I can view the locations via FileZilla. I wrote a test script that runs a method called 'UploadToFTPSite' this is the TEST SCRIPT code:public void UploadToFTPSiteSuccess(){ //Arrange var ibxMedOut...
20 Feb 2013 by CPallini
There is the GZipStream[^] class: check out the code sample.
19 Oct 2013 by CPallini
According to this table Data Type Ranges[^], the two definitions are compatible, hence you may safely follow Mike Meinz's advice and keep just one of them.
21 Oct 2014 by CPallini
You might use the FileSystemWatcher[^] class. There is a Code Project article about: "C#: Application to Watch a File or Directory using FileSystem Watcher"[^].
26 Apr 2012 by cpquest
Hi all,I am developing a CHAT application is there is any WCF Article that describs the the development of basic or advanced WCF File Transfer service.
1 May 2012 by cpquest
Hi,and also the following link is very simple File transferFile Transfer using WCF and Socket[^]
22 May 2013 by Cyrus Neah
The problem is with FtpDataStream.Read(Byte[] buffer, Int32 offset, Int32 size) method. FtpDataStream closes when it is unable to read and gets disposed. You need to create your own custom FtpDataStream and override the Read method and catch ObjectDisposedException error (return 0) to get you...
21 Nov 2011 by daftpunk1
Hi,try installing IIS. It has FTP features there.
28 Jan 2012 by Dalek Dave
I am trying to upload a spreadsheet to my webspace via VBA.It isn't working.Am I missing something obvious?I have stepped through and it crashes at the end, going to the msgbox and showing a fail.I think the problem is at the HOSTNAME stage, but for the life of me I cannot see...
2 Jun 2014 by DamithSL
try with FtpWebRequest , check How to: Download Files with FTP[^]How to transfer multiple files from FTP server to local directory using C#?[^]Or you can try one of Free FTP Library[^]
22 Dec 2012 by Dave Kreskowiak
Since you're using a custom FTPClient library that we know nothing about, it's impossible for anyone to tell you what the problem is.If you've got that FTPClient library from some vendor, you're best source of information is that vendor.If you wrote it yourself, we'd need to see the...
21 Mar 2013 by Dave Kreskowiak
Come on! How about asking the people who wrote FTPSync instead of a bunch of people who have never heard of it? See the "Support" link here[^]??
10 Apr 2013 by Dave Kreskowiak
This isn't going to work. You cannot treat an FTP server like is was a locally attached file system. You have to extract the .ZIP file locally, then upload the resulting files to where they are supposed to be one-by-one.
4 Mar 2014 by Dave Kreskowiak
If you're talking about an external FTP app that you're using, seperate from your own code, no there is no way to determine when that file download is complete.You can, however, just try to open the file, denying shared access to other applications. When you can finally open the file, the...
11 Aug 2014 by Dave Kreskowiak
Your question doesn't make any sense at all.What do you mean by "working with FTP"?? What does this app do? Are you hosting an FTP Server somewhere? What do you mean by "Add a list of my files in my program"?If you can't spell this out in detail you're going to have a very hard time...
31 Dec 2014 by Dave Kreskowiak
Well, you left some stones unturned. Did you check the documentation on the FTP server to see if it supports Unicode filenames? This may be something you can configure on the FTP server.BTW, this has nothing to do with C#.
14 Jul 2016 by Dave Kreskowiak
You cannot do that.You MUST download the file, do your operations to it and then upload it back to the FTP server.
7 Aug 2017 by Dave Kreskowiak
Basically, you can't. You have to create the .PDF file locally and upload it to the FTP server. The same goes for text files too. FTP servers do not support stream operations like reading/writing files directly.
11 Jul 2018 by Dave Kreskowiak
That's going to depend entirely on the configuration of the VPN and your other network devices. They have to be setup to allow connections between the two networks. There may be a firewall between the two networks that may need to be configured. Routing may need to be configured. A quick...
6 Dec 2018 by Dave Kreskowiak
There is no such thing as a "copy" operation between FTP sites. You have to download the file from your source FTP server, then update it to your destination FTP server.
28 Jul 2012 by David Jeske
You should start with some basic debugging so you can ask a more specific question than 'fix my code'.1) run it in a debugger. Trap on each FTP connect.. does it get there twice?2) add some status prints to your code to see what it is trying to do.. how it is parsing your configuration.....
10 Feb 2024 by deangi
IoT data edge hub is designed for remote low power unattended applications. IoT devices can post data to the Hub which will store the data and make it available for later download to core servers. Design is based on a low cost ESP32 platform with an attached SD card.
28 Jan 2024 by deangi
Monitoring AC loads with CT sensors
21 Nov 2023 by deangi
DIY GPS Location Tracker
17 May 2015 by deelll
Problem Statement:How do you write C# code that shall enable to send file with FTP? Do you have any recommended tutorial?Thanks!
10 Apr 2014 by deepak230890
i need my website to have upload & download functions for files present in ftp server (suggest better source to keep files online if any?) i should be able to select any file from my local machine and upload to ftp from where other users can download it and the download procedure is as follows i...
10 Apr 2014 by deepak230890
i am making a online directory of exam papers where only i can upload papers while students can only download ...a student after login selects the class of the paper then selects the year after this he is presented with a page which has a list of all papers for that class during that year in...
21 Nov 2011 by Denno.Secqtinstien
fileZilla is a directory listing tool you can see both sides preview from local as well as your remote server. search for remote server panel and using click go to your root dir.. there must be your images folder if you have created that one.. and for linking images..try :...
10 Jan 2014 by Deviprasad Das
FileSystemWatcher is not trust worthy.Instead of FileSystemWatcher you can go with timer.Set a timer and look inside the folder after particular interval, when you see a new file do the operation.Situations when FileSystemWatcher will fail:1. When you are using Network drives for...
27 Feb 2012 by DFriday13
I am unable to get any results from this service, none of my try/catches are giving me message boxes, nor am I able to debug it due to the installer restrictions. It installs with installUtil, and will let me start and stop the service. I'm a junior developer, very much a newb, and...
27 Dec 2012 by dinesh_redhawk
Hello all,I wrote a simple FTP program to transfer 4 text files to a device in a loop.(for testing we wanted to have a ftp tool which will be uploading 4 txt files continuosly without stop).The tool seems to be working fine, uploading the files repeatedly in an endless loop.But, we...