using FtpServer com library in c# ? - WeOnlyDo Discussion board

using FtpServer com library in c# ? (wodFTPServer)

by shady, Sunday, December 04, 2005, 01:48 (6726 days ago)

hello all

is it possible to use the ftpserver com library in c# ?

i tried everything but cannot execute the

FtpServer_LoginPassword(wodFTPDComLib.IFtpUser User, String Login, String Password, wodFTPDComLib.FtpActions Action)

event :(

can anyone post a mini class which shows how to allow maybe anonymous connections and show DirList() ?

code i tried:


namespace test
{
public partial class Form1 : Form
{

private wodFTPDComLib.wodFTPDComClass FtpServer;
private wodFTPDComLib.FtpUserClass FtpUsers;

public Form1()
{
InitializeComponent();
this.FtpServer = new wodFTPDComLib.wodFTPDComClass();
this.FtpUsers = new wodFTPDComLib.FtpUserClass();

//CONNECTION DATA
FtpServer.Port = 1800;

//USERS DATA
this.FtpUsers.Login = shade ;
this.FtpUsers.Password = aha ;
this.FtpUsers.VirtualFolders.Add( / , APPZ , H:\client\appz );

}

private void Form1_Load(object sender, EventArgs e)
{
FtpServer.Start(1800);
}

private void FtpServer_LoginPassword(wodFTPDComLib.IFtpUser User, String Login, String Password, wodFTPDComLib.FtpActions Action)
{
Action = wodFTPDComLib.FtpActions.Allow;
this.FtpUsers.HomeDir = E:\Home ;
}

private void FtpServer_Connecting(wodFTPDComLib.IFtpUser User, wodFTPDComLib.FtpActions Action)
{
MessageBox.Show(User.Login.ToString());
Action = wodFTPDComLib.FtpActions.Allow;
}


}
}


plz guys help me out [:doh:] thx in advice :)


Complete thread: