<customErrors

  • Thread starter Thread starter Arne Garvander
  • Start date Start date
A

Arne Garvander

I have <customErrors .. in my web.config but the redirect does not kick in.
What am I doing wrong?
<customErrors defaultRedirect="Error.aspx" mode="On">
<error statusCode="404" redirect="Filenotfound.aspx"/>
</customErrors>
 
I have <customErrors .. in my web.config but the redirect does not kick in..
What am I doing wrong?
<customErrors defaultRedirect="Error.aspx" mode="On">
                        <error statusCode="404" redirect="Filenotfound.aspx"/>
                </customErrors>

Arne

I suppose 404 is not working? If you call that page with the full URL
at http://servername/Filenotfound.aspx, does it work?
 
I can go there directly. The automatic redirect does not work.
--
Arne Garvander
Certified Geek
Professional Data Dude





- Show quoted text -

So, what do you get when you go to http://server/pagedoesnotexist.aspx?
A blank page, an error... etc?

Try to get rid of defaultRedirect="Error.aspx" to see if it 404 would
work, or not (maybe you have an exception somethere, or a redirect in
case of an error). Check if path of redirect is correct, change it to
"~/Filenotfound.aspx", or "~/DIR/Filenotfound.aspx"... If it doesn't
help, look at IIS, Application Configuration, properties for aspx
files in the Application Extensions and ensure that "Verify that file
exists" is unmarked.
 
Back
Top