I am trying to upload a file to the webserver through my
asp.net application. The file upload works fine for files
below 50 MB size because i have set the maxrequestlength
property of the <httpruntime> in the machine.config file
as 51200KB. whenever the user tries to upload a file which
is more than 51200KB then, a blank page with DNS error is
shown as soon as the user hits the submit button.
I want to be able to display an error message to the user
if the file size is greater than 50 MB. How do i catch
this error? I have tried using the try catch block in the
submit button onClick() event, but no use. Please post me
detailed answer.
Thanks in advance.