473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

WebClient DownloadFile over ssl / https

Can anyone get this to work? All Im getting is the login html being
downloaded.

Would appreciate any help - my heads hurts

Thanks
Gav

Aug 2 '06 #1
2 4914
It sounds like it is wanting you to login before you download ... if you
just go to the url in a brand new IE window what do you get? What type of
security is the site using?

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"gavkel" <ga****@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Can anyone get this to work? All Im getting is the login html being
downloaded.

Would appreciate any help - my heads hurts

Thanks
Gav

Aug 2 '06 #2
Hi Greg

Heres my basic code...

Uri uri = new
Uri("https://www.scoobydoo.com/downloads/velma_statistics.csv");
WebClient webClient = new WebClient();

CredentialCache mycache = new CredentialCache();
mycache.Add(new Uri("https://www.scoobydoo.com/home.html"),

"Basic", new NetworkCredential("scoobydoobydoo", "Passw0rd"));
webClient.Credentials = mycache;

webClient.DownloadFile(uri, @"c:\gav.txt");
Now, whats happening is Im trying to download velma_statistics.csv but
its over HTTPS. I can see whats happening - when I copy and paste the
contents of the downloaded gav.txt into a html page in VS, I get the
login page that I would need to firstly complete in IE before
successfully downloading my csv file, again manually.

So, any ideas?

Thanks

Aug 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Write | last post by:
Hi, I am using the webclient.downloadfile() method to download a file from a remote web server to the local harddrive. public CopyFile(string sSrcPath, string sDestPath) { WebClient oClient...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
1
by: Cheri Elkin | last post by:
I recieve the following error when attempting to download a file from our web server to be placed on our hard drive. Any clues as to why I would get this error? By the way, the directory already...
8
by: DEWright_CA | last post by:
Why does WebClient.DownloadFile loose my completed path? Ok, I have a function in my app then when my button is clicked it checks to see if the files come from a local drive or a http address....
1
by: peter.rietmann | last post by:
I have been suddenly having a performance problem downloading images from one server (productive) to another (productive) using the following code .. WebClient webClient = new WebClient(); try...
0
by: Saverio Tedeschi | last post by:
Hi all gurus, forgive me if I submit a 2nd post, but I'm no more able to see my question. So: I wrote an Win app with embedded FTP client (well, made some cut and paste from others' projects :-))...
1
by: vin.dor | last post by:
Dear All, I am using WebClient in my Visual Studio .Net 2003 project to download an image from the Internet. The following is my function: C# Code: public static bool downloadFile(string...
4
by: gavkel | last post by:
Can anyone get this to work? All Im getting is the login html being downloaded. Would appreciate any help - my heads hurts Thanks Gav
1
by: Chad T | last post by:
I am very new to VB.Net (most of my experience is with vbscript) My goal is to create a executable to download files from a HTTPS server. I have to pass the credentials to the https server. The...
8
by: =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post by:
WebClient.DownloadFile I am using the WebClient.DownloadFile function to download a file from server to a local client. When I execute the below code, file is created in server and not in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.