no custom routing. the the above config and my Error.aspx page. Seems to work fine for exceptions but 404s still give me the generic error page. I don't need to configure an error node under customErrors to direct 404s to the same Error.aspx page do I? I
want all exceptions and 404s (and other Http errors too) to go to Error.aspx.
How do I set up my web.config so all errors including 404 go to my custom error page?
GaryB36
1 Post
customerrors and 404
Dec 06, 2012 08:31 PM|LINK
I'm using ASP.NET 4.0 web forms with cutomerrors. I have
<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error.aspx" />
no custom routing. the the above config and my Error.aspx page. Seems to work fine for exceptions but 404s still give me the generic error page. I don't need to configure an error node under customErrors to direct 404s to the same Error.aspx page do I? I want all exceptions and 404s (and other Http errors too) to go to Error.aspx.
How do I set up my web.config so all errors including 404 go to my custom error page?
peterviola
548 Posts
Re: customerrors and 404
Dec 06, 2012 09:23 PM|LINK
Hi,
Take a look at this great blog post:
http://blogs.msdn.com/b/asiatech/archive/2010/04/16/custom-404-page-in-iis-7-500-19.aspx
Here is more information:
http://www.iis.net/configreference/system.webserver/httperrors
Also note that you cannot customize the following HTTP error messages: 400, 403.9, 411, 414, 500, 500.11, 500.14, 500.15, 501, 503, and 505.
MCTIP SA, EST, DBA 2008
Please 'Mark as Answer' if this post helps you.
OrcsWeb: Managed Windows Hosting Solutions
"Remarkable Service. Remarkable Support."