Click here to Skip to main content
15,918,516 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I've "pointed" my application to[^]

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

webClient.DownloadFile("", "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("", "ficheiro.pdf");

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

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.

Share this answer

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