Questions tagged [ftpwebrequest]

FtpWebRequest is a concrete class for .NET Framework applications that provides an FTP-specific implementation of the abstract WebRequest class. Related tag: [webrequest].

The FtpWebRequest class provides an FTP-specific implementation of the WebRequest class.
Implements a File Transfer Protocol (FTP) client.

MSDN documentation for FtpWebRequest.

612 questions
0
votes
1 answer

Copy files within a ftp server

I wanted to copy a file from one folder to another folder within a ftp server. For example if a file is on folder1 in a ftp server then i want copy it to folder2. I know how to move or rename the files in ftp server. I also searched in google to…
IT researcher
  • 3,274
  • 17
  • 79
  • 143
0
votes
1 answer

Why do I have to copy an FTP stream to another variable to return it to the calling method?

I am building some code to download images via FtpWebRequest. When I collect the response to the DownloadFile stream the only way that I've been able to return the image in memory to the calling function is to use…
turbonate
  • 159
  • 2
  • 13
0
votes
0 answers

check file on ftp server

I have found many posts on checking if the file on the ftp server exists. None of the codes provided helped. I am trying to auto upload small files to the ftp server BUT I don't want to override the file if it already exists. The following code…
0
votes
1 answer

Delete folder on ftp

Hi I want to delete a folder on my ftp I tried this: WebRequest request = WebRequest.Create(strPath); request.Method = WebRequestMethods.Ftp.RemoveDirectory; request.Credentials = new NetworkCredential(strUusername,strUpassword); …
0
votes
1 answer

File upload app is stuck

If I run my program and strUploadIP doens't exits in my network my whole application is stuck FileInfo toUpload = new FileInfo(strFile); FtpWebRequest req = (FtpWebRequest)WebRequest.Create(@"ftp://" + **strUploadIP** + @"/"…
0
votes
1 answer

How to change an FTP host user/password with FtpWebRequest?

Is this possible? Or what is the best way to do so in a .NET application?
defmx
  • 13
  • 3
0
votes
0 answers

How Can I Save Image File To Another Host With FTP

I get my image file like this; var image = WebImage.GetImageFromRequest(); Than I save my image file to my local like this; image.Save(Path.Combine("~/Images", NewFileName), "jpg"); But I want to save the image file to another hosting.. How can I…
yusuf
  • 1,233
  • 1
  • 15
  • 29
0
votes
1 answer

Get FTP directory content issue if it's empty

I have code what gets a content of some FTP directory. At some servers I've tested it works fine. But at one server this method throws an exception when we try to get response. public static List ListDirectory(string dirPath, string…
Vitalii
  • 10,091
  • 18
  • 83
  • 151
0
votes
3 answers

System.OutOfMemoryException: FTP Upload

I am attempting to load files up to an FTP server. Here is my code: // Create the request. FtpWebRequest request = (FtpWebRequest)WebRequest.Create(appSettingsFTP.ftpUrl + @"/" + filename); …
Ian Best
  • 510
  • 1
  • 11
  • 23
0
votes
1 answer

reading files in subfolders in directory c# streamreader

I need to find all files and all subfolders in a directory. I am omitting the FtpWebRequest. Here is what I have written so far: private string[] fileList () { StringBuilder result = new StringBuilder(); WebResponse response = null; …
avidprogrammer
  • 57
  • 1
  • 11
0
votes
1 answer

UnauthorizedAccessException

I am working with the tutorial here: http://www.devtoolshed.com/content/c-download-file-progress-bar and I am receiving an UnauthorizedAccessException on the following line of code using (Stream streamLocal = new FileStream(sPathToWriteFilesTo,…
avidprogrammer
  • 57
  • 1
  • 11
0
votes
2 answers

After some connection I have a 'not logged in' issue

In my Web application I need to set path to two FTP folders and in model validation I try to check if these folders exists on the FTP server. My problem is that first time this usually works and the second time usually too. But the third time I…
Vitalii
  • 10,091
  • 18
  • 83
  • 151
0
votes
1 answer

c# FTP File Download Times out

I am downloading a file from my FTP Server. When it gets to the last bytes it freezes and times out. I had to set the timeout to -1 so it won't time out but the last bytes never finish. Any ideas? FtpWebRequest request =…
Andre DeMattia
  • 631
  • 9
  • 23
0
votes
0 answers

FtpWebRequest ListDirectory truncated at 10,000 files

I am trying to get an FTP directory listing. I have more than 10,000 files in my folder and it seems that the list I get back is truncated at 10,000 files. Is there anything I can do so that I can get all the files back? FtpWebRequest request =…
Rob Sedgwick
  • 4,342
  • 6
  • 50
  • 87
0
votes
1 answer

How do I use a Progress Bar with FtpWebRequest class?

I was trying to do this on my own but have run into a situation where I need some help. I would like to use a progressbar control to show the current progress of an FTP file upload. Currently, I am manually changing the value of the progressbar…
Kismet Agbasi
  • 557
  • 2
  • 8
  • 28