The following are three ways to log in to FTP, but they still require a username for a username or password:
System.Net.FtpWebRequest f = System.Net.FtpWebRequest.Create(new Uri("ftp://somewhere.com")) as System.Net.FtpWebRequest; if (f != null) { f.Credentials = new System.Net.NetworkCredential("username", "password", "domain"); f.Credentials = new System.Net.NetworkCredential("username", "password"); f.Credentials = new System.Net.NetworkCredential(System.Security.Principal.WindowsIdentity.GetCurrent().Name, "password"); }
The latter accepts a Windows username, but still requires some way to get the password from the user.
source share