Asp.net DNS error

  • Thread starter Thread starter Amar
  • Start date Start date
A

Amar

I have set the file size limit to 50 MB in the
Machine.config file on the websever. whenever a user tries
to upload a file which has size > 50 MB, then my
application quits showing a DNS error page.
With some help from this forum, i have been able to trap
this error of file size limit in the Application_Error()
event. But when i try to redirect the program to the error
page, it does not work. I have tried using, Response.Write
("errorpage.aspx"), Server.Execute("errorpage.aspx")and
Server.Transfer("errorpage.aspx") one at a time. (No error
is thrown on any of these methods)
None work and asp.net still shows me the DNS error page.
Is there a way to stop asp.net from displaying this page
and enforce it to display my error page.
Please help! Thanks in Advance.
 
and none will work.

when the browser posts the file, and the and size limit is hit, ASP.Net
closes the ip connection to stop any more upload. To the browser this looks
like a request error, thus the standard DNS error message. the browser will
never look at the response, as the post never completed.

if you want the Server to reply back that the file is too large, then the
server must accept the whole file, then respond with a message. of course
this has other side effects, like the waits for the whole upload, then gets
the error. your server has to pay for the whole upload cost.


-- bruce (sqlwork.com)
 
Back
Top