Thanks John. The code does go into the application error
event during debugging, but does not redirect the page to
the error page. i tried ALL three methods i.e.
response.redirect, server.transfer and server.execute. But
the error page is not displyed. My error page has just one
label on it which says " Error occured in file transfer" .
It still shows the DNS error page.
Please shed some light on this if u can. Thank you.
[color=blue]
>-----Original Message-----
>Try to catch the exception in the Application_Error event[/color]
handler in[color=blue]
>the global.asax file
>
>Code:
>=====
>
>Dim AppEx As Exception = Server.GetLastError()
>If AppEx.Message.CompareTo("Maximum request length[/color]
exceeded.") = 0 Then[color=blue]
>'this is an overlimit upload
>'clear the error out
>Server.ClearError()
>'redirect to my error page
>Response.Redirect("errorpage.aspx")
>End If
>
>Please let me know if this works for you.
>
>Thank you,
>John Soulis
>Microsoft, ASP.NET
>
>This posting is provided "AS IS", with no warranties, and[/color]
confers no rights.[color=blue]
>Use of included script samples are subject to the terms[/color]
specified at[color=blue]
>
http://www.microsoft.com/info/cpyright.htm
>
>.
>[/color]