Limit WebClient DownloadFile maximum file size
Posted
by Jack Juiceson
on Stack Overflow
See other posts from Stack Overflow
or by Jack Juiceson
Published on 2010-04-11T07:51:24Z
Indexed on
2010/04/11
7:53 UTC
Read the original article
Hit count: 665
Hi everyone,
In my asp .net project, my main page receives URL as a parameter I need to download internally and then process it. I know that I can use WebClient's DownloadFile method however I want to avoid malicious user from giving a url to a huge file, which will unnecessary traffic from my server. In order to avoid this, I'm looking for a solution to set maximum file size that DownloadFile will download.
Thank you in advance,
Jack
© Stack Overflow or respective owner