Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-03-23
3
Medium Priority
?
418 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 83

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

715 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