By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,783 Members | 1,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,783 IT Pros & Developers. It's quick & easy.

Asp.net DNS error

P: n/a
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.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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)


"Amar" <an*******@discussions.microsoft.com> wrote in message
news:14*****************************@phx.gbl...
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.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.