c# WebClient - I'm getting a "Not logged in" error on an aparrently anonymous site

My internet brokerage (InteractiveBrokers) has, obviously, a very secure site.  However, as far as I can tell, they supply some public useful information on what I would think is a public site.  The address is ftp://ftp2.interactivebrokers.com/usa.txt.  Maybe there is some cookie somewhere that is supplying my login details but I've tried logging out of IB in order to test this, and I still have no problem accessing the address - through Internet Exporer.

So I can access the site easily from Internet Explorer.  But if I try download it using WebClient in C# I always get the error "The remote server returned an error: (530) Not logged in.".  I've tried adding my IB username/password as Credentials, but that doesn't seems to make a difference.

So I guess firstly I'm asking, is the ftp site accessible by everyone as I assume.  And if so, what do I need to do to access it using WebClient?
eb8931Asked:
Who is Participating?
 
eb8931Author Commented:
I spoke to the company and it turns out there is a username (with a blank password) for the site.  I find it a bit strange, since you can view it in IE without any credentials, but from C# you have to pass the username.
0
 
FarWestCommented:
this is FTP site not Http, IE works because it has a feature for browsing FTP sites
BTW, the site do not work for anynomus user, I have tried it just now
mybe it works with you in IE because it has credintal caching

try to use tcpclient class
check this thread
http://cboard.cprogramming.com/networking-device-communication/115662-how-connect-ftp-server.html

if your app is winform, then may be is easer to  to use ie control
0
 
eb8931Author Commented:
I'm not sure about TcpClient, but I tried to use FtpWebRequest as in the link, and ended up with the same error, both when I use anonymous and when I use my actual username/password to the site.
0
 
eb8931Author Commented:
Cancelling the question
0
 
FarWestCommented:
glad to hear that your problem is solved
good luck
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.