550 fichier indisponible erreur avec FtpWebRequest classe de téléchargement de fichiers. Fonctionne très bien dans FileZilla

Je me suis cherché et trouvé d'autres questions sur ce sujet, mais aucun n'a résolu mes problèmes. Je suis en train de télécharger un fichier via FTP à l'aide de l'échantillon de code MSDN. Je reçois le serveur distant a retourné une erreur: (550) Fichier indisponible (par exemple, fichier non trouvé, pas d'accès) erreur sur cette ligne: ftpstream.Close();

    string inputfilepath = @"C:\DWF\test.txt";
    string ftpfilepath = "/abc/def/hij/klm/nop/test.txt";
    string ftphost = "my-ser-ver1:2121";
    //here correct hostname or IP of the ftp server to be given  

    string ftpfullpath = "ftp://" + ftphost + ftpfilepath;
    FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpfullpath);
    ftp.Credentials = new NetworkCredential("user", "pass");
    //userid and password for the ftp server to given  

    ftp.KeepAlive = true;
    ftp.UseBinary = true;

    ftp.Method = WebRequestMethods.Ftp.UploadFile;
    FileStream fs = File.OpenRead(inputfilepath);
    byte[] buffer = new byte[fs.Length];
    fs.Read(buffer, 0, buffer.Length);
    fs.Close();
    Stream ftpstream = ftp.GetRequestStream();
    ftpstream.Write(buffer, 0, buffer.Length);
    ftpstream.Close(); 

J'ai une double vérification de l'URI pour les espaces vides et il n'en existe aucune. Je suis en mesure d'accomplir cette tâche à l'aide de filezilla avec la même connexion de l'utilisateur. Il n'y a pas de oddball répertoire par défaut qui est déjà une partie de mon URI. Une chose est sûre c'est que je suis connecté à un serveur unix alors peut-être il y a un paramètre que je suis absent?

Edit #1 (Ajouté le journal des erreurs de System.Net)

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [220 Oracle Content Services FTP Server ready.]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [USER myuser]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [331 Password required for myuser.]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [PASS ********]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [230 Login successful.]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [OPTS utf8 on]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [500 Command not supported: OPTS]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [PWD]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [257 "/"]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [TYPE I]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [200 TYPE set to I.]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [PASV]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [227 Entering Passive Mode (10,8,9,50,77,53)]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Sending command [STOR abc/def/hij/klm/nop/test.txt]

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [150 Ok to send data.]

System.Net Verbose: 0 : [7584] Exiting FtpWebRequest#10964107::GetRequestStream() 

System.Net Information: 0 : [7584] FtpControlStream#62182359 - Received response [550 Access denied.]

System.Net Information: 0 : [7584] FtpWebRequest#10964107::(Releasing FTP connection#62182359.)
Êtes-vous en traversant tous les proxys?

OriginalL'auteur SteveCalPoly | 2012-03-08