views:

111

answers:

3

What is the simplest way to create my own FTP server in C#? Some of the folders will be virtual folders. The authentication should be from a SQL Server database, which includes tables of the ASP.NET Membership API Authenctication.

Any ideas?

+1  A: 

There is a free networking library which also contains an FTP server from RemObjects, called InternetPack.

It also includes an sample application of a FTP sever building a virtual folder structure. Authentication is hardcoded in the sample, but this can easily be adopted to use the membership providers.

Sebastian P.R. Gingter
A: 

Any reason for not using the FTP server that is bundled with IIS? I'm not sure if it can draw its user credentials from SQL Server but I would try like hell to find a way to extend it instead of creating my own.

D.Shawley
This is not what he is asking for, try to answer the question or don't reply at all. This type of answers do more harm then good, i.e. Q: "I want to build my own car, how do I go about to do it?", A: "Why build your own car? just buy an already assembled one"
thr
@thr: i disagree. Often times developers are not aware that there are solutions out there already implemented that can be used and can be a better option rather than creating one's own. For instance, many people are aware of IIS but how many know that it supports FTP? i've seen many questions on SO get "answered" this way. Just the other day i asked for a reg ex pattern to solve a code issue and an SO user suggested that FxCop actually does exactly what i wanted...
Paul Sasik
@thr: To me the real questions are security concerns. FTP's insecure enough as it is. "Rolling your own" is likely to be easier to hack than using an established commercial or open source solution. If the OP's doing it solely to **learn**, that's a different story.
TrueWill
A: 

This should get you started: Multi-threaded FTP Program written in C#

Paul Sasik