Re: Customize Error Page
From: Nicole Calinoiu (calinoiu)
Date: 11/25/04
- Next message: Nicole Calinoiu: "Re: Security problem..."
- Previous message: Nicole Calinoiu: "Re: Defining minimum permissions"
- In reply to: Shabam: "Customize Error Page"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 25 Nov 2004 13:49:13 -0500
One approach would be to catch the error from the Application_Error
procedure in your Global.asax file. e.g.:
protected void Application_Error(Object sender, EventArgs e)
{
Exception ex = Server.GetLastError();
if (ex is HttpRequestValidationException)
{
// Do one thing.
}
else
{
// Do something else.
}
}
HTH,
Nicole
"Shabam" <xxredbaronxxx@hotmail.com> wrote in message
news:JcKdnYbyYfLz7j7cRVn-gw@adelphia.com...
> When I set validateRequest="true", and a user tries to submit html into
> the
> form, the server returns with a huge error page detailing what wasn't
> allowed.
>
> Is there a way to customize just this error page to something more
> friendly?
> I want to use different error pages for other things, but for this one I'd
> like to customize it. Is this possible?
>
>
- Next message: Nicole Calinoiu: "Re: Security problem..."
- Previous message: Nicole Calinoiu: "Re: Defining minimum permissions"
- In reply to: Shabam: "Customize Error Page"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|