eb8931
asked on
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?
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?
ASKER
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cancelling the question
glad to hear that your problem is solved
good luck
good luck
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