tags:

views:

28

answers:

1

I am having trouble to access a FTP server via C# because of not finding the right URI. The ftp server can be found using ftp.xxx.com - thus ftp ftp.xxx.com works from the command line, ftp ftp://ftp.xxx.com yields unknown host via the command line. The same happens then when using
FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(new Uri(Settings.Default.FtpServer, UriKind.Absolute));
inside my C# program What am I doing wrong/how do I need to determine the URI?

A: 

Which WebRequestMethod do you set? If its set to download a file, it might fail because your URI is not pointing to a file but to the root directory of the server. Im not sure if its the point can't test it myself but looks logically to me.

edit: Default Method is DownloadFile (looked up with reflector)

bassfriend
WebRequestMethods.Ftp.UploadFile is my method, but the crash happens right at the constructor. Could it be that I need to add a routing for the URI?
weismat