Problème avec des commandes Ftp dans une application Web C#
eric.bryan
Messages postés6Date d'inscriptiondimanche 15 juin 2014StatutMembreDernière intervention 3 juillet 2020
-
15 juin 2014 à 18:15
eric.bryan -
17 juin 2014 à 10:03
Bonjour à tous,
J'ai développé une application web qui doit uploader des fichiers vers un serveur Ftp.
Mais je n'arrive pas à uploader les fichiers.
Je passe par un fichier de commande Ftp : Ftp_Upload.bat :
Voici le fichier de log Ftp quand j'exécute ce code C# :
ftp> Connecté à 100.100.100.100 OPEN 100.100.100.100 220 ESSAI1 ftp> user usr_essai 331 User usr_essai, password please
230 Password Ok, User logged in ftp> binary 200 Type Binary ftp> cd dir_essai 250 Change directory ok ftp> ftp> mput "C:\Essai_Ftp\*.doc" 200 Port command received 425 Unable to open the data connection 200 Port command received 425 Unable to open the data connection 200 Port command received 425 Unable to open the data connection 200 Port command received 425 Unable to open the data connection ftp> ftp> quit 221
Par contre quand je lance manuellement le fichier de commande (Ftp_Upload.bat), les fichiers sont correctement uploadés.
Aussi, le code C# passe bien quand je désactive de Parefeu Windows (Windows 7).
Mais il faut que je laisse le Parefeu activé pour des raisons de sécurité.
Auriez-vous une idée ?
Merci beaucoup par avance.
Eric.
A voir également:
Problème avec des commandes Ftp dans une application Web C#