Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
20.1k views
in .NET FTP by (580 points)
I am not totally stupid, but....

I have an ASP.NET 1.1 application from which a client wants me to send them a file via SFTP... they have an SFTP Server their end.

I can't get my head round what I require - is edFTPNet enough? Or have I got to install some sort of SFTP Servver (or SSH Server) as well?

I don't need any UI in my application - it will simply create a file each day and then SFTP it across to the client.

Is there an "How to for dummies" anywhere? :)

Thanks...

22 Answers

0 votes
by (162k points)
edited by

You need an SFTP client to connect to their SFTP server.

edtFTPnet supports "plain" FTP, which is not secure. SFTP (also known as FTP over SSH) is a secure file transfer protocol - the transferred data is encrypted.

edtFTPnet/PRO is required for SFTP. 

For an SFTP server that runs on Windows, try CompleteFTP - there's a 30 day trial you can use.

0 votes
by (580 points)
You need an SFTP client to connect to their SFTP server.


Thanks - what I am still not clear about it this: does edtFTPnet/PRO contain ALL that I need - is it an SFTP client in itself, or do I need to install SFTP client software separately?
0 votes
by (162k points)
edtFTPnet/PRO is a complete SFTP client - it contains all you need. It also is a complete FTP and FTPS (FTP over SSL) client, in case you require those protocols.
0 votes
by (580 points)
OK, many thanks - I'll download the trial and see if I can figure it out..! It's tricky though, 'cos my development machine can't access the client's SFTPServer (because I can't give them a fixed IP number) so I'll have to try and develop it here then upload it to the development server to test, which I can only access via RDC... why is life never simple? :-)
0 votes
by (162k points)
I hope edtFTPnet/PRO will make it easy for you :)

To start with set server validation to None - it'll make it easier. You can add server validation later once it is all working.

The below code should get you connected. I haven't compiled it; should be ok I hope :)

SecureFTPConnection conn = new SecureFTPConnection();
conn.ServerValidation = SecureFTPServerValidationType.None;
conn.Protocol = FileTransferProtocol.SFTP;
conn.UserName = "user";
conn.Password = "mypwd";
conn.ServerAddress = "hostname";
conn.Connect();
0 votes
by (580 points)
Well, it was never going to be that simple eas it?

First error I got was:

"License owner and/or key not found. Please set the LicenseOwner and LicenseKey properties."

As I am still using the trial download O haven't got a licence... In the document ation I found this in one of your samples;

conn.LicenseOwner = "trialuser"
conn.LicenseKey = "924-6819-3963-4124"

Is that sufficient? Tried it anyway, and got this error next time:

Cannot access a disposed object named "System.Net.Sockets.Socket". Object name: "System.Net.Sockets.Socket".

Help?!!

cheers....
0 votes
by (580 points)
OK, so why the *** in that post? They refer to "Licence Owner" and "Licence Key" (though as one word, obviously)
0 votes
by (162k points)
Normally the installation will place the license owner & license key in the registry so you don't need to explicitly set them.

Have you got it working yet?
0 votes
by (580 points)
Ah.. so I have to run ther msi on the server? I only did that to extract the files on my development machine then just copied the dll up to the applicaiton /bin folder...
doing that should sort out this sockets issue too then? And what happens when I purchase the full product (assuming I can get this to work)? Will I have tio uninstall the trial and reinstall the product to get valid entries in the registry again?
0 votes
by (162k points)
You don't have to run the MSI on the server - you can just copy the DLL.

But if you do copy to another machine you must set the license properties explicitly in the code (as above) or recreate the registry entries.

If you purchase the full product we'll send you production properties which you can set explicitly in the code (they'll never expire). Registry entries are ok for trials, but they are a pain if your app always needs to have them before it works.

The license properties (so you can get the trial values) can be found in

HKEY_CURRENT_USER\Software\Enterprise Distributed Technologies\edtFTPnet PRO

When developing this kind of thing, it is always best to enable logging to a log file:

conn.LogLevel = LogLevel.All;
conn.LogFile = "C:\mypath\log.txt";

That will quickly help to diagnose problems, and if there's a problem you can't figure out just post the relevant bit of the log file.

Categories

...