 |
|
 |
Hi, I'm using you library, but BeginDownload fail and don't. My code is this...In the Login(), the socket is null. But Download() works fine...
private void ProcesarCasaMatriz(KeyValuePair CasaMatriz)
{
try
{
string DirectorioLocal = string.Format("{0}\\{1}", _ConfiguracionServicio.ExportFolder, CasaMatriz.Value.Rif);
if (!Directory.Exists(DirectorioLocal)) Directory.CreateDirectory(DirectorioLocal);
FTPClient FTPAux = new FTPClient(_ConfiguracionServicio.FTPServer, _ConfiguracionServicio.FTPUserName, _ConfiguracionServicio.FTPPassword, 0, 21) { RemotePath = _ConfiguracionServicio.FTPRemoteFolder };
FTPAux.Login();
foreach (var Transmision in CasaMatriz.Value.Transmisiones)
{
string FileRemoto = CasaMatriz.Value.Transmisiones.Peek().FileName;
string FileLocal = string.Format("{0}\\{1}\\{2}", _ConfiguracionServicio.ExportFolder, CasaMatriz.Value.Rif, Transmision.FileName);
AsyncCallback ac = new AsyncCallback(ProcesarArchivo);
FTPAux.BeginDownload(FileRemoto, FileLocal, ac);
}
FTPAux.Close();
}
catch (Exception ex)
{
if (Log.IsErrorEnabled) Log.Error("Se ha generado un error durante el procesamiento de la Casa Matriz.", ex);
}
}
private void ProcesarArchivo(IAsyncResult ar)
{
throw new NotImplementedException();
}
Thanks...
Edward Vargas
|
|
|
|
 |
|
 |
I've tried to use your FTP Client class in a small windows service application that periodically checks a local ftp server and downloads new files. The problem that I've been experiencing is that Norton 360 SONAR Protection classifies the software as a threat and deletes it as soon as it tries to access any FTP resource on the network.
To dismiss all doubts, I used the same FTP class in a small windows application, and ended up with the same result: the application was shut down and deleted as soon as any of the FTP functionality was run.
Is there any remedy to this problem?
|
|
|
|
 |
|
 |
When uses class FtpWebRequest to download csv file from ftp server, i get bug "Object reference not set to an instance of an object" on Net 4.0.
|
|
|
|
 |
|
 |
Thanks for your work on this library.
I'va made a small adjustment :
added a
System.Threading.Thread.Sleep(1000);
before the first this.readResponse(); on the login method to prevent for servers differents from "localhost" with long welcome messages.
added
if (this.resultCode != 230)
{
this.sendCommand("ACCT " + account);
if (!(this.resultCode == 230 || this.resultCode == 202))
{
this.cleanup();
throw new FtpException(this.result.Substring(4));
}
}
after PASS command on the login method (usefull to work with some firewalls configurations)
|
|
|
|
 |
|
 |
Somehow I encountered some obscure behavior with your component: for some reason, Dns.Resolve() started returning IPv6 adress first, thus making, say, function Login() fail (even though IPv6 is turned off on my adapter).
this.clientSocket = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );
addr = Dns.Resolve(this.server).AddressList[0]; ep = new IPEndPoint( addr, this.port );
this.clientSocket.Connect(ep);
A slight modification solved this problem. Take a look and consider adding to your code:
this.clientSocket = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );
foreach (IPAddress a in Dns.GetHostEntry(this.server).AddressList)
if (a.AddressFamily == AddressFamily.InterNetwork)
{
addr = a;
break;
}
ep = new IPEndPoint( addr, this.port );
this.clientSocket.Connect(ep);
|
|
|
|
 |
|
 |
I am getting following error while uploading big file like a file of size 50MB
the connection was reset
The connection to the server was reset while the page was loading.
* The site could be temporarily unavailable or too busy. Try again in a few
moments.
* If you are unable to load any pages, check your computer's network
connection.
* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.
|
|
|
|
 |
|
 |
This tool is good. It has some limitation such as handling big files as you have found. To overcome this issue, you may need to develop your own lib or use existing one on the internet. You can find some other topics about FTP at this FTP blog.
|
|
|
|
 |
|
 |
hi,
how can i download entire directory(inclue sub directory) to local Machine from FTP server
By
Vijayr
Vijaya Raghavendran R
|
|
|
|
 |
|
 |
Some one has responded to your SAME question in the Q&A's here[^].
|
|
|
|
 |
|
 |
hai,
when i tried logging in i got this error
kindly help
System.IndexOutOfRangeException was caught
Message="Index was outside the bounds of the array."
Source="TestService"
StackTrace:
at TestService.FtpClient.readLine() in D:\Cosraco Project\TestService\TestService\FTPClient.vb:line 741
at TestService.FtpClient.readLine() in D:\Cosraco Project\TestService\TestService\FTPClient.vb:line 748
at TestService.FtpClient.readResponse() in D:\Cosraco Project\TestService\TestService\FTPClient.vb:line 715
at TestService.FtpClient.Login() in D:\Cosraco Project\TestService\TestService\FTPClient.vb:line 233
at TestService.Form1.Form1_Load(Object sender, EventArgs e) in D:\Cosraco Project\TestService\TestService\Form1.vb:line 70
thanks
sibi
|
|
|
|
 |
|
 |
Hi,
I tried to download the .exe file 36MB from Server. After the download had been started within about 10 seconds. Error occured: this.result is 426 Connection colse; transfer aborted. I had tried servral time. The problem is same.
please help me to slove this problem. Thanks in advance.
new start
|
|
|
|
 |
|
 |
ok. Now I know the solution. In the download function, the timeout has been set to 10 seconds. So I modified the code. It works well. Thank you
new start
|
|
|
|
 |
|
 |
All I Know is How Little I know
|
|
|
|
 |
|
 |
When upload more than 170 files , error
Help me!
|
|
|
|
 |
|
 |
i downloaded a 3MB file and it only downloaded the first 1.5MB...
|
|
|
|
 |
|
 |
Check...time out conection... Try this...in the download metod...
while (true)
{
_bytes = cSocket.Receive(_buffer, _buffer.Length, 0);
output.Write(_buffer, 0, _bytes);
if (Timeout.Equals(0))
{
if (_bytes <= 0) break;
}
else
{
if (_timeout > DateTime.Now)
{
break;
}
}
}
|
|
|
|
 |
|
 |
I am a student,this ftpserver is so good.
|
|
|
|
 |
|
 |
hide folder is display?
このメソッドを利用すれば、隠しフォルダが表示されますか?
|
|
|
|
 |
|
 |
Hello
If you search a comfortable and reusable FTP client,
-- which is running on .NET Framework 1.1 or higher,
-- which can automatically put together splitted files on the server,
-- which allows to download only a part of a file on the server,
-- which allows to resume any broken download,
-- which automatically starts a separate thread,
-- which can be aborted any time from your main thread,
-- which supports UTF8 encoded filenames,
-- which has a built-in download scheduler,
-- which has a built-in bandwidth control,
-- which has a built-in preview function for the download of movies,
-- which automatically reconnects the server after an error has occurred,
-- which displays download progress in percent and in bytes and the remaining time,
-- which writes a detailed logging for all operations it does,
-- which is based on Wininet.dll and has one workaround for each of the 4 known Wininet.dll bugs,
-- which is very well tested and bug-free,
-- which is written by a very experienced programmer and has a very clean and well documented sourcecode,
then have a look at this project:
ElmueSoft Partial FTP Downloader[^]
Elmü
|
|
|
|
 |
|
 |
i'm a beginner.i am using your webcam class to upload files to a remote server. can you please advice me how to implemnt a progressbar to specify the whole process status(i.e. from connecting to uploading).please help me. i tried a lot but all in vain.i tried out backgroundprocess and thread etc but couldn't find a perfect method to implement a progressbar here in this proccess.Please help
|
|
|
|
 |
|
 |
The connection to my FTPServer is a secure connection and when I try to connect to the server via your class this message is shown:
:Additional information: This account requires a secure connection to log in, please use SSL."
Please let me know how I can connect to my server?
Thanks in advance,
Saeideh
|
|
|
|
 |
|
 |
You shouldn't use FTP because its security is low. Your server allows only SSL. You must use a ssl connection instead.
|
|
|
|
 |
|
 |
Hello,
I'm searching an FTP library, in .NET, which allows sending such a command as of Subject.
Yours, can?
|
|
|
|
 |
|
|
 |
|
 |
Change
private static Encoding ASCII = Encoding.ASCII;
With
private static Encoding ASCII = Encoding.GetEncoding("GB2312");
Good luck!
|
|
|
|
 |