FTPS using C# 2.0

G

Guest

I have a need to create a windows service that monitors some directories
waiting for new files to appear. When certain new files are detected, it is
to FTPS them to another internal server for processing. Now, I know that the
..NET framework version 2.0 has built-in classes to handle both FTP and SSL.
I have written a quick-and-dirty little service that actually does FTP new
files appearing in the directory to another server. It works nicely.

What I can't seem to find online, however, is how to integrate SSL into the
process.

I only need PUT; the rest of the FTP commands are superfluous for my needs,
so I am trying to avoid 1) purchasing a third-party FTPS-capable package (no
budget) or 2) acquiring some freeware code that does everything and is so
tightly integrated that I can't just cannibalize the pieces I need (not a lot
of time).

My company is in the "Health Care" umbrella, so the reason for SSL is
because there might be information in the files that falls under HIPAA. And,
even though the transfer is from one internal server to another, HIPAA reigns
supreme. :)

Can anyone point me to a resource that explains how (or perhaps contains
examples) to integrate FtpWebxxx and the SslStream (and other related)
class(es)? I would greatly appreciate any help.
 
G

Guest

I've been told I can't use any third-party software. Period. I could go into
why, but it wouldn't make any more sense after I explained it than it does
now. This is why I'm trying to 'grow my own."

I'll check it out (I remember the old ws_ftp), but the chances of me being
allowed to use it are slim and none.
 
B

Baski

I understand your requirement , I searched for open source I didn't find any
where , then we used Ws_FTP , after some time our client introduced secure
certificate , that created whole new problem , because no way to accept the
certificate by the process running on the background.

Our client situation was same as yours , both server on the same network, we
used the shared drives and copy the files across.
 
M

Mike Lowery

Filezilla is an open source SFTP client/server, but not sure how easily it'd
incorporate into a .Net project.
 
W

William Stacey [C# MVP]

http://www.tamirgal.com/home/dev.aspx?Item=SharpSsh is the only one I see
out there and have not tried it and they say to use at your own risk.
Here is another library: http://www.jscape.com/sftpdotnet/index.html You
have to pay, but would be much cheaper then rolling your own.

--
William Stacey [C# MVP]

|I have a need to create a windows service that monitors some directories
| waiting for new files to appear. When certain new files are detected, it
is
| to FTPS them to another internal server for processing. Now, I know that
the
| .NET framework version 2.0 has built-in classes to handle both FTP and
SSL.
| I have written a quick-and-dirty little service that actually does FTP new
| files appearing in the directory to another server. It works nicely.
|
| What I can't seem to find online, however, is how to integrate SSL into
the
| process.
|
| I only need PUT; the rest of the FTP commands are superfluous for my
needs,
| so I am trying to avoid 1) purchasing a third-party FTPS-capable package
(no
| budget) or 2) acquiring some freeware code that does everything and is so
| tightly integrated that I can't just cannibalize the pieces I need (not a
lot
| of time).
|
| My company is in the "Health Care" umbrella, so the reason for SSL is
| because there might be information in the files that falls under HIPAA.
And,
| even though the transfer is from one internal server to another, HIPAA
reigns
| supreme. :)
|
| Can anyone point me to a resource that explains how (or perhaps contains
| examples) to integrate FtpWebxxx and the SslStream (and other related)
| class(es)? I would greatly appreciate any help.
 
E

Eugene Mayevski

Hello!
You wrote on Fri, 6 Oct 2006 12:56:01 -0700:

K> I've been told I can't use any third-party software. Period. I could go
into
K> why, but it wouldn't make any more sense after I explained it than it
does
K> now. This is why I'm trying to 'grow my own."

Then you have to implement your own FTPS client based on either .NET
sockets, or FTPWebRequestClass. BTW the latter seems to be the best choice.

However I must warn you that SSL/TLS support in .NET is far from ideal - no
AES cipher suites, no TLS 1.1 etc ...

With best regards,
Eugene Mayevski
http://www.SecureBlackbox.com - the comprehensive component suite for
network security
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top