Hello how can I replace our FTP server with this server in our code?
string [] filePaths = Directory.GetFiles (@ "c: \ MyDir \", "* .bmp"); For example: string [] filePaths = Directory.GetFiles (@ "Our FTP Address", "* .bmp");
The first code is running well but the other is not working! Examples from DisplayFileFromServer (your BMP file)
'Publicize
Fixed bool DisplayFileFromServer (URI serverUri) {// server URI parameter should start with the ftp: // scheme. If (serverUri.Scheme! = Uri.UriSchemeFtp) {return false; } // Get the object used to communicate with the server webclient request = new webclient (); request. Credentials = New network credentials (try "anonymous", "jane do.") {Byte] newFileData = request.DownloadData (serverUri.ToString ()); string fileString = System.Text.Encoding.UTF8.GetString (newFileData); Console .WriteLine (fileString);} Hold (WebException e) {console.wrightline (e.ToString ());} back true;} `
Comments
Post a Comment