<customErrors

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>
 
G

Guest

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?
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top