Solved

404 Error on Folder / Directory in ASP.Net on IIS7

Posted on 2012-03-23
3
403 Views
Last Modified: 2012-03-26
Hi Experts!

I've Googled the hell out of this and am getting nowhere. I have created a website and need to get a custom 404 error page working.

I know how to do this so that it works for file requests. EG, if someone requests http://www.mywebsite.com/page.aspx and it doesn't exist, I can make it forward on to the 404 correctly using the web.config file.

However, if I request http://www.mywebsite.com/folder (IE, with no file extension so it's looking for a folder that does not exist), I get this bad boy:

ASP.Net 404 Error Page
I'd have thought I need to change something in IIS, but don't know where to start with that.

Any help much appreciated.

Bob
0
Comment
Question by:Bobeo
3 Comments
 
LVL 9

Expert Comment

by:gery128
ID: 37757061
you might want to disable Directory browsing for your site. that would prevent accessing folders/directories directly.
0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 37760375
click on edit feature settings and turn off detailed errors for local requests and custom error pages for remote requests and set it to custom error pages
custom errors
0
 
LVL 3

Author Closing Comment

by:Bobeo
ID: 37765157
Perfect!

Cheers for your help!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question