You have done nothing wrong.
Your web.config entries only apply to files mapped to aspnet_isapi.dll.
You can do two things to get more functionality.
1. Map the extensions you want caught to aspnet_isapi.dll.
That might cause some performance loss.
2. Edit the standard IIS http error pages so they return the info you want returned.
They are located in Drive:\%WINDIR%\Help\iisHelp\common
Make sure you back them up first...just in case somethng goes wrong.
Juan T. Llibre, asp.net MVP
aspnetfaq.com :
http://www.aspnetfaq.com/
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
===================================
<st*************@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Can you help!!
I have put in my web.config:
<customErrors mode="On" defaultRedirect="~/ErrorPage.aspx">
<error statusCode="403" redirect="~/ErrorPage.aspx"/>
<error statusCode="404" redirect="~/ErrorPage.aspx"/>
</customErrors>
This works when you put in a invalid page ie www.mysite.com/test.aspx.
The problem I have is that if you put anything else in the URL like:
www.mysite.com/test.asp or www.mysite.com/test the error page is NOT
shown.
What have I done wrong?????