Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I've "pointed" my application to
http://www.nytimes.com/2011/05/24/technology/24sony.html?_r=1[^]

to test the pdf download. I was getting always an error with

webClient.DownloadFile("http://www.sony.net/SonyInfo/IR/financial/fr/10revision_sony.pdf", "ficheiro.pdf");


I've copy-pasted the URL just to make sure and then I discovered if I try it other links that dont happen, e.g,

webClient.DownloadFile("http://www.di.ubi.pt/~ddg/aulas/licenciatura/dwdm/dw/ch1s.pdf", "ficheiro.pdf");


It's a kind of protected mode of the web server or something?
Posted

1 solution

Why Web client?

I've developed the application called HttpDownloader and shared its full source code here:
how to download a file from internet[^].

You can consult this source code to see how to do it right. It let you to continue the interrupted downloads, which is very important. It served me very well for a long time; I never saw any problems.

Before you develop your own code you can test your URLs on my program to make sure they can really be uses to test your code.

Enjoy,
—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900