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

Posted on 2011-10-20
Medium Priority
Last Modified: 2012-05-12
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?
Question by:eb8931
  • 3
  • 2
LVL 12

Expert Comment

ID: 37004170
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

if your app is winform, then may be is easer to  to use ie control

Author Comment

ID: 37008193
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.

Accepted Solution

eb8931 earned 0 total points
ID: 37011206
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.

Author Closing Comment

ID: 37035354
Cancelling the question
LVL 12

Expert Comment

ID: 37011210
glad to hear that your problem is solved
good luck

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question