Quantcast
Channel: C# FTP Library
Viewing all 88 articles
Browse latest View live

New Post: GetFile corrupting .jar

$
0
0
Just did, the files show no difference. Yet the one my app downloads does not function correctly.

It's minecraft.jar, as I said. I only get the error on the one my app downloaded, yet VBinDiff didn't find anything different.

New Post: ftp.RemoveDirectory could not be more stupid than this

$
0
0
I expected that remove directory removes all sub directories recursively. It is what a LIbRARY means.

But this method just throws an exception just like FtpRequest class in .Net .

Totally disappointed

Reviewed: FTPLib v4.0.0.0 (Aug 08, 2013)

$
0
0
Rated 5 Stars (out of 5) - Works as expected, like the release before. Just compiled the sourcecode, replaced the lib, and there goes my .NET 4-upgraded project.

New Post: Have you thought about converting to GIT? I'd like to fork and submit changes.

$
0
0
So I'd like to fork the project and submit changes that would enable testability, ie, allow for isolation for a bigger project that I have in mind.

I guess I could do my own local git repo and submit patches from my commits, but I'm curious if you (project owners) had considering making the move.

svn is so 2000's ;-)

New Post: NUGET Support

$
0
0
I'd like to get library from Nuget Portal.

I see a Package in Nuget but it does not update lasted version.

https://www.nuget.org/packages/ftplib/

Last published: 2011-06-17
Owners: jonasee
Authors: Scott Meyer
Lasted Version: ftplib 1.0.1.2 - Last updated: Friday, June 17 2011

Should you upload it to Nuget?

New Post: Pass through a PROXY

$
0
0
Hi, I'm writting an open source application that needs to download files from FTP sites. Some users have to pass through a PROXY server go to Internet. I would like to provide, in my application, the 3 wellknown settings :
1- No Proxy
2- Use Internet Explorer Settings
3- Use these custom settings : servername / serverport /username / password

How your library negotiate proxy ?

New Post: GetFile() failing on large files (Unknown error (0x2ee2))

$
0
0
Anyone have found the solution for this? Same problem here with large files in Windows Azure VM.

New Post: if (ftp.FileExists(fName + ".dsc")) doesn't seem to work

$
0
0
I tried doing it like this all so.
string fName = Path.GetFileNameWithoutExtension(file.Name);

if (ftp.FileExists("/admin/" + Category + "/" + fName + ".dsc" ))
From what I saw and read, this is the right way to use this. No matter what I try it doesn't seem to work. Any one have some ideas or an idea why this doesn't work.

Joe

New Post: if (ftp.FileExists(fName + ".dsc")) doesn't seem to work

$
0
0
Well this is what makes my day, when there's just one knows any thing. Makes me want to throw up.

It turned out to be once to set up the local directory and the current directory. You don't need to add the folder path in the ftp.FileExists(); method.

Created Unassigned: Login impossible with right password, server... [11536]

$
0
0
Hi !
I've been using FtpLib for a few weeks now, but I just found an error that is beyong my understanding...
I'm accessing my FTP servers as showed in the doc :
```
using (FtpConnection ftp = new FtpConnection(detail.FtpServer, detail.FtpUsername, detail.FtpPassword))
{
ftp.Open();
ftp.Login();
}
```
And I'm getting a Win32Exception with error code 0x2eee. That error corresponds to "12014 ERROR_INTERNET_INCORRECT_PASSWORD - The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect.".
The problem is that I tried successfully to connect with those information with FileZilla and Firefox.
I even tried with .Net's FtpWebRequest.

By the way, I can access other FTP server or even the same server with another account without trouble.

The only one the keeps saying the password isn't ok is FtpLib. Does anyone know why ?

PS : I thought it might be because of special characters but I have no possibility to change it... (Special characters contained : "$à&!:?")

Commented Unassigned: Login impossible with right password, server... [11536]

$
0
0
Hi !
I've been using FtpLib for a few weeks now, but I just found an error that is beyong my understanding...
I'm accessing my FTP servers as showed in the doc :
```
using (FtpConnection ftp = new FtpConnection(detail.FtpServer, detail.FtpUsername, detail.FtpPassword))
{
ftp.Open();
ftp.Login();
}
```
And I'm getting a Win32Exception with error code 0x2eee. That error corresponds to "12014 ERROR_INTERNET_INCORRECT_PASSWORD - The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect.".

The problem is that I tried successfully to connect with those information with FileZilla and Firefox.
I even tried with .Net's FtpWebRequest.
I can also access other FTP server or even the same server with another account without trouble.
The only one the keeps saying the password isn't ok is FtpLib with this specific password. Does anyone know why ? And how to correct it.

PS : I thought it might be because of special characters but I have no possibility to change it... (Special characters contained : "$à&!:?")
Comments: ** Comment from web user: Nanolenain **

Finally found the problem : it's pretty much what I thought. Somme characters aren't encoded as should be.

Simple solution : Encode password to ANSI.

New Post: How to move a file from one remote directory to another

$
0
0
use ftp.RenameFile() with the new directory path in the filename as follows:
           ftp.RenameFile(file.Name, "/history/" + file.Name);  
it will move the file with the new name....

New Post: Documentation

$
0
0
Could you please make just the essential documentation? Like showing just the basics of using this library.
It might not be too much to ask.
Thanks.

Created Unassigned: DWORD Flags are supposed to be UInt32 [11664]

$
0
0
First of all, I would like to thank you for this excellent project!

I noticed that in your WININET wrapper class that you use a signed int type (Int32) for your P/Invoke declarations, this would work only if you do not use flags. I wanted to update the FtpGetFile method in the class FtpConnection to never cache the remote resource to ensure that it always takes the file from the FTP server. To do this you need to enable the INTERNET_FLAG_NO_CACHE_WRITE flag when calling FtpGetFile method. But because of an incorrect data type the flag is ignored. Changing all DWORD flags to use UInt32 would resolve the issue

According to the MSDN documentation, a DWORD is a 32-bit unsigned integer (range: 0 through 4294967295 decimal). Because a DWORD is unsigned, its first bit (Most Significant Bit (MSB)) is not reserved for signing.

Commented Issue: Get Error - Handle is Invalid while Getting Directory list [10278]

$
0
0
I am getting error - 'handle is invalid' - while getting List of Directories using `GetDirectories(string mask)` method. this error i do not get in regular manner but in random manner.
 
How to fix it??
Comments: ** Comment from web user: Seraphimmmm **

hi ,

try this:

using (FtpConnection ftp = new FtpConnection(@"ftp://192.168.1.100"))

change to

using (FtpConnection ftp = new FtpConnection(@"192.168.1.100"))


Created Unassigned: How to use GetFile to retrieve Uncached files [11690]

$
0
0
Thank you for developing the FTPLIB component. Currently the call to FtpGetFile will always return back the Cached version of the file. In my application I am retrieving a file that changes frequently so it did not for me. I researched to how to solve the problem and found that I need to add the INTERNET_FLAG_RELOAD to the dwflags parameter in the call to GetFile.

I found the that the value in WinAPIs.cs for {public const int INTERNET_FLAG_RELOAD = 8;}
should have been {public const Int32 INTERNET_FLAG_RELOAD = 0x80000000;} 0x80000000 is to large for the int variable. I then needed to modify all (DWORD) mappings from Int to Int32 so it would compile.

I also added Uncached calls to GetFile
public void GetFileUnCached(string remoteFile, string localFile, bool failIfExists)
{
int ret = WININET.FtpGetFile(_hConnect,
remoteFile,
localFile,
failIfExists,
WINAPI.FILE_ATTRIBUTE_NORMAL,
WININET.FTP_TRANSFER_TYPE_BINARY + INTERNET_FLAG_RELOAD,
IntPtr.Zero);

if (ret == 0)
{
Error();
}
}

Created Unassigned: Incompatibility of the library between IE6 and IE7/IE8 [11721]

$
0
0
Hello,

First of all, congratulations for your work. We open this issue to explain you a different behavior between IE6 and IE7/IE8.

We use the same simple script who put a file on a FTP server using the c# FTP Library.

If IE6 is installed, the C# FTP Library works well. The FTP Connection then the GetFiles Function works fine.

if we installed IE7 or IE8, the C# FTP Library doesn't works. The FTP Connection is OK but the GetFiles Function generates an error.

FTP exception : FtpLib.FtpException Message : 200 Command okay
227 Entering passive mode (10,0,1,73,219,250).

We suspected that the file wininet.dll for IE7/IE8 is incompatible withe IE7 or IE8.

Is there a workaround to use this library with IE7/IE8 ?

Thanks for your answer

Reviewed: FTPLib v.1.0.1.3 (五月 28, 2014)

$
0
0
Rated 5 Stars (out of 5) - I only try,thanks!

Reviewed: FTPLib v4.0.0.0 (七月 24, 2014)

$
0
0
Rated 5 Stars (out of 5) - i am very like it.

New Post: The Handle Is Invalid Error

$
0
0
Hi. I am getting a "the handle is invalid" error when I try to get directories. I have tried both getting the current directory and get directories method and I still get the error.

FtpConnection ftp = new FtpConnection(@"10.0.151.20"); ftp.Open();

ftp.GetCurrentDirectory());
FtpDirectoryInfo[] dirs = ftp.GetDirectories();

Note:
int ret = WININET.FtpGetCurrentDirectory(_hConnect, str, ref buffLength);

In the above line of code:

_hConnect = 0
str = {}
buffLength = 261
Viewing all 88 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>