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

C

Casper Stendal

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

Steve C. Orr [MVP, MCSD]

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>
 

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

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top