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

Posted on 2011-10-20
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  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
    LVL 12

    Expert Comment

    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

    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

    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

    Cancelling the question
    LVL 12

    Expert Comment

    glad to hear that your problem is solved
    good luck

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    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…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now