Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

liyufx

Posts

1

Joined

Thu Sep 05, 2013 7:40 am

FTPConnectionClosedException: Could not create socket

by liyufx » Fri Sep 06, 2013 1:07 am

Hi,

I am using the EnterpriseDT's edtFTPnetPRO.dll (file version 7.0.1.20) to connect to a FTP server, and run into the following error when uploading a small XML file to the server

EnterpriseDT.Net.Ftp.FTPConnectionClosedException: Could not create socket.
at EnterpriseDT.Net.Ftp.FTPClient.uZ2VdP0Kq(Stream , String , Boolean , Boolean )
at EnterpriseDT.Net.Ftp.FTPClient.K1iG4OfM1(String , String , Boolean )
at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
at EnterpriseDT.Net.Ftp.FTPConnection.UploadFile(String localPath, String remoteFile, Boolean append)
at EnterpriseDT.Net.Ftp.FTPConnection.UploadFile(String localPath, String remoteFile)

Before uploading, the code opens the connection to the FTP server and creates two levels of directories on the server, all work fine, but when it actually tries to upload the file it fails. I have tried to run the same code on different machines, with the same result.

I also get a similar exception when listing files on the FTP server:

EnterpriseDT.Net.Ftp.FTPConnectionClosedException: Could not create socket.
at EnterpriseDT.Net.Ftp.FTPControlSocket.ValidateReply(FTPReply reply, String[] expectedReplyCodes)
at EnterpriseDT.Net.Ftp.FTPControlSocket.eyU9bUJij4()
at EnterpriseDT.Net.Ftp.FTPControlSocket.rkdfzp9CDd(FTPConnectMode connectMode)
at EnterpriseDT.Net.Ftp.FTPClient.Dir(String dirname, Boolean full)
at EnterpriseDT.Net.Ftp.FTPConnection.GetFiles(String directory, Boolean full)
at EnterpriseDT.Net.Ftp.FTPConnection.GetFiles(String directory)
at EnterpriseDT.Net.Ftp.FTPConnection.GetFiles()

The same code works with other FTP servers without this problem. On the other hand, I tried other FTP clients (windows commandline, FileZilla) on this particular FTP server, all work fine.

Any idea what could be wrong and how to fix it?

Thanks in advance for your help,

Yu
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: FTPConnectionClosedException: Could not create socket

by support2 » Fri Sep 06, 2013 2:06 pm

This is usually a firewall problem. If other clients work then try switching from active mode to passive mode or vice versa.

Who is online

Users browsing this forum: Google [Bot] and 21 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron