Re: customizing validation script-injection error page.
From: Peter Blum (PLBlum_at_Blum.info)
Date: 01/21/05
- Previous message: Devante: "Re: redirecting to specific webpage after logging in - ASP.NET 2.0"
- In reply to: EO: "customizing validation script-injection error page."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 21 Jan 2005 12:48:20 -0500
All exceptions can be captured in two places, using event handlers:
1. Page object has the Error property
2. Global.asax has the method Application_Error
Your task is to test the class of exception object and redirect to the
desired page.
You can get the current exception from
HttpContext.Current.Server.GetLastError().
--- Peter Blum
www.PeterBlum.com
Email: PLBlum@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
and "Visual Input Security" at http://www.peterblum.com/vise/home.aspx
"EO" <me@home.com> wrote in message
news:eIR6eb9$EHA.2704@TK2MSFTNGP10.phx.gbl...
>I think i've googled to the end of the internet, but just can't find any
>resources to tell me how to customize the glorious error message that says:
>
> Server Error in '/Code' Application.
>
> A potentially dangerous request.form value was detected from the
> client.......
>
>
>
> How do I post a user friendly message? Or do I just assume that anyone who
> would generate such a message is a hacker and doesn't deserve a friendly
> message?
>
> Many Thanks,
>
> E. Ostrander
>
- Previous message: Devante: "Re: redirecting to specific webpage after logging in - ASP.NET 2.0"
- In reply to: EO: "customizing validation script-injection error page."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|