I can download this by hand in IE.
But, using follow code
WebClient client = new WebClient(); client.DownloadFile(address, filename);
Show Exception: 403 Forbidden
What's wrong? How can I do that?
others
I can download this by hand in IE.
But, using follow code
WebClient client = new WebClient(); client.DownloadFile(address, filename);
Show Exception: 403 Forbidden
What's wrong? How can I do that?
others
I get a 403 in IE, I guess you need to be logged in to retrieve the resource. Your browser may have the credentials cached but your app isn't designed to log you in. Or are you logged in to Google in your browser - try logging out and see if you still have access....
You need to set appropriate http headers before calling your DownloadFile
method.
WebClient webClient = new WebClient();
webClient.Headers.Add("???", "???");
webClient.Headers.Add("???", "???");
webClient.Headers.Add("???", "???");
webClient.DownloadFile(address, filename);
To put correct values instead of these question marks might be tricky. You will need to download Fiddler or some other program or webbrowser extension to reveal what http headers are being sent to Google by your webbrowser and basically replicate the same request in your program.