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.
Baski - 06 Oct 2006 20:47 GMT
ws_ftp pro with command line process excution is the way to go.
>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
[quoted text clipped - 29 lines]
> examples) to integrate FtpWebxxx and the SslStream (and other related)
> class(es)? I would greatly appreciate any help.
Kaa - 06 Oct 2006 20:56 GMT
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.
> ws_ftp pro with command line process excution is the way to go.
Eugene Mayevski - 07 Oct 2006 16:28 GMT
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
Baski - 06 Oct 2006 21:52 GMT
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.
>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
[quoted text clipped - 29 lines]
> examples) to integrate FtpWebxxx and the SslStream (and other related)
> class(es)? I would greatly appreciate any help.
Mike Lowery - 06 Oct 2006 22:32 GMT
Filezilla is an open source SFTP client/server, but not sure how easily it'd
incorporate into a .Net project.
>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
[quoted text clipped - 28 lines]
>> examples) to integrate FtpWebxxx and the SslStream (and other related)
>> class(es)? I would greatly appreciate any help.
William Stacey [C# MVP] - 07 Oct 2006 05:14 GMT
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.

Signature
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
[quoted text clipped - 20 lines]
| examples) to integrate FtpWebxxx and the SslStream (and other related)
| class(es)? I would greatly appreciate any help.