As the title states, I can connect to another machine from my server via FileZilla Client, but I cannot via code (.Net – FTPWebRequest)
I know the code is good, as it works from another machine. The particular machine I am having trouble with is behind a NAT, but the SA has opened all ports for traffic from the host we are trying to talk to.
Any suggestions – have I missed something obvious?
The exception I get from the attempted connection is:
“Unable to read data from the
transport connection: A connection
attempt failed because the connected
party did not properly respond after a
period of time, or established
connection failed because connected
host has failed to respond.”
And, the logs from the machine we are trying to connect show:
7/26/2010 12:40:23 PM – (not
logged in) (xx.xx.xxx.xxx)> Connected,
sending welcome message…7/26/2010 12:40:23 PM – (not
logged in) (xx.xx.xxx.xxx)>
220-FileZilla Server version 0.9.32
beta7/26/2010 12:40:23 PM – (not
logged in) (xx.xx.xxx.xxx)> 220
http://ftp.xxxxxxxxxx.com7/26/2010 12:40:23 PM – (not
logged in) (xx.xx.xxx.xxx)> AUTH TLS7/26/2010 12:40:24 PM – (not
logged in) (xx.xx.xxx.xxx)> 234 Using
authentication type TLS7/26/2010 12:41:24 PM – (not
logged in) (xx.xx.xxx.xxx)> 421 Login
time exceeded. Closing control
connection.7/26/2010 12:41:24 PM – (not
logged in) (xx.xx.xxx.xxx)>
disconnected.
Sorry I forgot to come back here with my solution – It was implicit vs explicit SSL. I was using implicit for the FileZilla use case but explicit for the FTPWebRequest. Unfortunately, FTPWebRequest doesn’t support implicit and the NAT was having problems with explicit.
Long story short, we went with a FTPS control called Alex FTPS client that is easy to use for either implicit or explicit ssl, easy to setup, and works flawlessly.