views:

85

answers:

0

Hello, In ASP.NET, I need redirect to a custom page when file size is exceeded.

The application executes the code inside file test.aspx in Me.Server.Trasnsfer in other errors but when is an too big file error the web browser don't render it and shows that cannot show the page.

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    If GlobalHelper.IsMaxRequestExceededEexception(Me.Server.GetLastError()) Then
        Me.Server.Transfer("~/Error/test.aspx")
    End if

Please help! Thanks.