Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.5k views
in .NET FTP by (160 points)
Good morning,

I was hoping someone might be able to tell me what i'm doing wrong.

I'm getting an error "socket operation encountered a dead network" when I attempt to execute the ".CONNECT()" method on a SecureFTPConnection object. I'm able to connect to the same server using command line FTP. I'm doing this via a c# web service. I've got the same code running on a different server and it works as expected.

Could anyone shed some light on this?

TIA,
Donnie Jacobs



DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.891 : Setting LicenseOwner property if changed
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.891 : Set LicenseOwner property
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.891 : Setting LicenseKey property (if changed)
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.891 : LicenseKey property changed
INFO [KnownHostsManager] 8 Oct 2007 07:19:03.891 : Reading known hosts file 'c:\known_hosts'
DEBUG [KnownHostsManager] 8 Oct 2007 07:19:03.937 : Added ssh-dss public key to host manager for host 'sftp.banko.com'
INFO [KnownHostsManager] 8 Oct 2007 07:19:03.937 : Successfully read known hosts file 'c:\known_hosts'
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.937 : Setting ServerAddress=67.11.219.110
DEBUG [SFTPMessageStore] 8 Oct 2007 07:19:03.937 : Set timeout=60000
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.937 : Setting UserName=dlj
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.937 : Setting password
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.953 : Setting ServerCompatibility=SSLDisableControlWaitOnShutdownSSL
DEBUG [SecureFTPConnection] 8 Oct 2007 07:19:03.969 : Setting ServerValidation property
INFO [LicenseProperties] 8 Oct 2007 07:19:04.016 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 8 Oct 2007 07:19:04.016 : Production license
INFO [LicenseProperties] 8 Oct 2007 07:19:04.016 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 8 Oct 2007 07:19:04.016 : Production license
DEBUG [SSLFTPClient] 8 Oct 2007 07:19:04.016 : Connecting to 67.11.219.110:21
DEBUG [HostNameResolver] 8 Oct 2007 07:19:04.047 : 67.11.219.110 resolved to 67.11.219.110
DEBUG [SSLFTPControlSocket] 8 Oct 2007 07:19:04.047 : waitOnShutdownSSL=False
DEBUG [ExFTPControlSocket] 8 Oct 2007 07:19:04.156 : Connecting directly to ftp-server 67.11.219.110:21
ERROR [WSTransfer.WSTransfer] 8 Oct 2007 07:19:05.859 : A socket operation encountered a dead network : System.Net.Sockets.SocketException: A socket operation encountered a dead network
System.Net.Sockets.SocketException: A socket operation encountered a dead network
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at eu.a(EndPoint A_0)
at dd.b(EndPoint A_0)
at ax.a(BaseSocket A_0, IPAddress A_1, Int32 A_2)
at am.a(BaseSocket A_0, IPAddress A_1, Int32 A_2)
at EnterpriseDT.Net.Ftp.FTPControlSocket.a(BaseSocket A_0, IPAddress A_1, Int32 A_2, Int32 A_3, Encoding A_4)
at ax.a(BaseSocket A_0, Boolean A_1, SocksContext A_2, ProxySettings A_3, IPAddress A_4, Int32 A_5, Int32 A_6, Encoding A_7)
at am..ctor(Boolean isTrial, Boolean isImplicitFTPS, SocksContext socksContext, ProxySettings proxySettings, cr securityOptions, IPAddress remoteHost, Int32 controlPort, Int32 timeout, SecureFTPCompatibilityFlags compatFlags, Encoding encoding)
at EnterpriseDT.Net.Ftp.Ssl.SSLFTPClient.Connect()
at EnterpriseDT.Net.Ftp.SecureFTPConnection.Connect()
at WSTransfer.WSTransfer.VendorDownloadFileList(String Vendor) in c:\Inetpub\wwwroot\WSTransfer\App_Code\WSTransfer.asmx.cs:line 236

3 Answers

0 votes
by (162k points)
This is a Windows error that is saying the network is down. Can you connect to the FTP server via command line from this machine?

It could be a problem with a proxy server or firewall blocking connection to the FTP server also.
0 votes
by (160 points)
Yes, I can connect to the FTP server via command line from the same machine that's running the web service. Based on your reply, I set up a couple of tests having the web service connect to local machines within our network. In both cases, i was able to connect and get directory listings.

Does the .NET control use a different mechanism to access ftp sites outside of the network? Would it use a firewall differently than when I'm at the command line? I have the web service running with my credentials, so it seems like it should have the same permissions, etc that I would have when running at the command prompt.

Is there anymore information that I could give that would help pinpoint the problem?

Thanks for your help!
0 votes
by (162k points)
Try running the ExampleViewer that ships with net/PRO on the same machine.

If that works (i.e. connecting to the server example) then it is a permissioning problem.

Categories

...