Hi All, I have a branch of my site that is just plain html (not under a Virtual Directory). Is there a way to cause a custom 404Error.html page to load when a user tries to access an invalid page? or browse a folder? The default 404 page is not good because it exposes the site Physical Path -- the hackers will love it.
Here are some instructions on how to enable custom errors. 1) Log into your site using IIS7 Manager by following the instructions in this Knowledge Base article. 2) Double click on the Error Pages module to open it. 3) On the right hand side, click on the Edit Feature Settings... link. 4) Check Custom error pages, put in the Default Page Path, select File as your Path type and click on OK. Alternatively, you can also enable custom errors by manually editing the web.config file. For IIS6, ASP, and Classic mode applications, please update this line in the web.config file: <customErrors defaultRedirect="url" mode="On" /> For IIS7, ASP.NET, and Integrated mode applications, please update this line in the web.config file: <httpErrors defaultPath="url" errorMode="Custom" /> Make sure you replace url with the URL to your error page.