How to query data from a password protected https website using C# .NET

Posted by Addie on Stack Overflow See other posts from Stack Overflow or by Addie
Published on 2010-04-14T21:30:41Z Indexed on 2010/04/14 21:33 UTC
Read the original article Hit count: 273

Filed under:
|
|
|
|

I'd like my application to query a csv file from a secure website. I have no experience with web programming so I'd appreciate detailed instructions. Currently I have the user login to the site, manually query the csv, and have my application load the file locally. I'd like to automate this by having the user enter his login information, authenticating him on the website, and querying the data. The application is written in C# .NET. The url of the site is: https://www2.emidas.com/default.asp.

I've tested the following code already and am able to access the file once the user has already authenticated himself and created a manual query.

        System.Net.WebClient Client = new WebClient();
        Stream strm = Client.OpenRead("https://www3.emidas.com/users/<username>/file.csv");

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET