Asp.net DNS error

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.
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top