I need to set up a custom 404 page for one of our IIS sites, which I've
done. This works for any URL pointing at this site EXCEPT if it ends with a
.aspx.

If it ends with an .aspx I get a generic 404 error page. I assume any non
aspx request is being handles by IIS, but the aspx requests are actually
being handles by .net

How do I change the default error page that asp.net is redirecting to?

-Darrel

Re: 404, asp.net 2.0 and IIS by David

David
Tue Jul 01 19:25:05 CDT 2008

On Jul 1, 11:51=A0am, "darrel" <notr...@nowhere.com> wrote:
> I need to set up a custom 404 page for one of our IIS sites, which I've
> done. This works for any URL pointing at this site EXCEPT if it ends with =
a
> .aspx.
>
> If it ends with an .aspx I get a generic 404 error page. I assume any non
> aspx request is being handles by IIS, but the aspx requests are actually
> being handles by .net
>
> How do I change the default error page that asp.net is redirecting to?
>
> -Darrel


Actually, request handling works like this:
http://blogs.msdn.com/david.wang/archive/2005/10/14/HOWTO_IIS_6_Request_Pro=
cessing_Basics_Part_1.aspx

IIS Custom Errors only apply to handlers that use it, and not all
handlers use IIS's configuration.

For example, ASP.Net has its own <customErrors> setting for all
requests handled by it.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: 404, asp.net 2.0 and IIS by darrel

darrel
Wed Jul 02 09:21:08 CDT 2008

> For example, ASP.Net has its own <customErrors> setting for all
> requests handled by it.

Ah! That didn't occur to me. There's no actual ASP.net app on this site, but
it's obviously running the framework. I'll add a config file and that should
work. Thanks!

_Darrel



Re: 404, asp.net 2.0 and IIS by David

David
Wed Jul 02 15:04:49 CDT 2008

On Jul 2, 7:21=A0am, "darrel" <notr...@nowhere.com> wrote:
> > For example, ASP.Net has its own <customErrors> setting for all
> > requests handled by it.
>
> Ah! That didn't occur to me. There's no actual ASP.net app on this site, =
but
> it's obviously running the framework. I'll add a config file and that sho=
uld
> work. Thanks!
>
> _Darrel


If you have no ASP.Net app, then you can use aspnet_regiis.exe to
remove the ASP.Net bindings from that site, in which case .aspx
becomes unmapped to ASP.Net, so IIS will handle request processing for
that extension and hence send out the custom error you configured in
it.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//