G
Guest
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.
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.
..-----Original Message-----
Try to catch the exception in the Application_Error event handler in
the global.asax file
Code:
=====
Dim AppEx As Exception = Server.GetLastError()
If AppEx.Message.CompareTo("Maximum request length exceeded.") = 0 Then
'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 confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
.