468,291 Members | 1,571 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,291 developers. It's quick & easy.

Hot to handle "Directory not found" from ASP.NET?

Is it some how possible to handle a "directory not found" error through
ASP.NET (or ASP), without having to make speciel a setup for the application
in IIS, when it comes from an URL without extension, like this:
http://www.mywebpage.com/folder/notfound/

Any comments are preciated?
May 18 '06 #1
1 1427
Sure, put something like this in the System.Web section of your Web.Config
file:
<customErrors mode="RemoteOnly" >
<error statusCode="404" redirect="/Support/PageNotFound.aspx" />
</customErrors>

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Casper Stendal" <cs***@VEecreo.dk> wrote in message
news:OR**************@TK2MSFTNGP04.phx.gbl...
Is it some how possible to handle a "directory not found" error through
ASP.NET (or ASP), without having to make speciel a setup for the
application in IIS, when it comes from an URL without extension, like
this:
http://www.mywebpage.com/folder/notfound/

Any comments are preciated?

May 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.