By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,364 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,364 IT Pros & Developers. It's quick & easy.

FTP peculiarity

P: n/a
I am having this weird problem with FTP in C# 1.1. I am using an open
source library for FTP connections, and everything works fine all the
time except when i try to connect to one specific server. This one
server will allow me to connect but when I request any data including a
'dir' i get an exception:

<Failed to connect for data transfer: 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>

But the strange thing is, not only does my program work with all other
FTP servers i've tried, but I can connect to the problematic server
using my command line ftp client and ws_ftp without a hitch. Also i
tried several different libraries out there and still, my C#
applications will not successfully data transfer with this one server.
So my question is, is there something unique to C# data sockets or
TCP/IP that would explain this behavior? Does anyone have any other
ideas at facets i should explore in trying to solve this problem?

Nov 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
At that point, I would either try to use another FTP component, or look
into writing your own. The protocol is not that difficult, and you could
probably implement it quickly.

Writing your own would also allow you to figure out what that particular
server is returning which is out of order (at least, in relation to your FTP
class).

If you want to take a look at the protocol yourself, you can look for
Request For Comments (RFC) 959.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"thewhoracle" <tw*************@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I am having this weird problem with FTP in C# 1.1. I am using an open
source library for FTP connections, and everything works fine all the
time except when i try to connect to one specific server. This one
server will allow me to connect but when I request any data including a
'dir' i get an exception:

<Failed to connect for data transfer: 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>

But the strange thing is, not only does my program work with all other
FTP servers i've tried, but I can connect to the problematic server
using my command line ftp client and ws_ftp without a hitch. Also i
tried several different libraries out there and still, my C#
applications will not successfully data transfer with this one server.
So my question is, is there something unique to C# data sockets or
TCP/IP that would explain this behavior? Does anyone have any other
ideas at facets i should explore in trying to solve this problem?

Nov 17 '05 #2

P: n/a
As a test, if you have vs2005 beta2, FX 2.0 has FTP client support. If that
works, then your client lib is most likely the issue.

--
William Stacey [MVP]

"thewhoracle" <tw*************@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I am having this weird problem with FTP in C# 1.1. I am using an open
source library for FTP connections, and everything works fine all the
time except when i try to connect to one specific server. This one
server will allow me to connect but when I request any data including a
'dir' i get an exception:

<Failed to connect for data transfer: 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>

But the strange thing is, not only does my program work with all other
FTP servers i've tried, but I can connect to the problematic server
using my command line ftp client and ws_ftp without a hitch. Also i
tried several different libraries out there and still, my C#
applications will not successfully data transfer with this one server.
So my question is, is there something unique to C# data sockets or
TCP/IP that would explain this behavior? Does anyone have any other
ideas at facets i should explore in trying to solve this problem?

Nov 17 '05 #3

P: n/a
tried several client libs, none work with this one server. and i have
vs2003. i may look into implementing my own proto but i feel like
that won't help considering 3 different client libraries didn't do the
trick, and their creators were more knowledgeable than myself

Nov 17 '05 #4

P: n/a
Try the FX 2.0 lib. It is probably worth a shot before going down the RFC
path and rolling your own.

--
William Stacey [MVP]

"thewhoracle" <tw*************@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
tried several client libs, none work with this one server. and i have
vs2003. i may look into implementing my own proto but i feel like
that won't help considering 3 different client libraries didn't do the
trick, and their creators were more knowledgeable than myself

Nov 17 '05 #5

P: n/a
do i need to download that/will it work with vsNet2003?

Nov 17 '05 #6

P: n/a
> do i need to download that/will it work with vsNet2003?

Unfortunatly no. You need VS2005 Beta2 to try it (which will install FX
2.0). The other idea it to Rev the bad server to another ftp version or
other product. It sounds like maybe the server is not following the RFC
correctly. You could do a network capture to figure that out. That may be
the best way to figure out who/what is to blame. What is the server FTP
software?

--
William Stacey [MVP]

Nov 17 '05 #7

P: n/a
thewhoracle wrote:
I am having this weird problem with FTP in C# 1.1. I am using an open
source library for FTP connections, and everything works fine all the
time except when i try to connect to one specific server. This one
server will allow me to connect but when I request any data including a
'dir' i get an exception:

<Failed to connect for data transfer: 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>

But the strange thing is, not only does my program work with all other
FTP servers i've tried, but I can connect to the problematic server
using my command line ftp client and ws_ftp without a hitch. Also i
tried several different libraries out there and still, my C#
applications will not successfully data transfer with this one server.
So my question is, is there something unique to C# data sockets or
TCP/IP that would explain this behavior? Does anyone have any other
ideas at facets i should explore in trying to solve this problem?

If the special server can be connected from other client app (command
line ftp client and ws_ftp,etc),
it is possible the server is behind a firewall and just can be connected
in FTP port mode but your library just connect it in port mode.

Check your FTP library, find out can it set the FTP port/passive mode.
Try different mode.

For the difference of port/passive mode, you can refer
http://support.microsoft.com/?kbid=323446

--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
Nov 17 '05 #8

P: n/a
i wouldn't know, it's a remote server from which i am procuring
invetory information

Nov 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.