Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:57:37+00:00 2026-06-02T18:57:37+00:00

Using IIS 7.5 I have created a custom 404 (and 403.14) error page that

  • 0

Using IIS 7.5 I have created a custom 404 (and 403.14) error page that displays content from a database if a static file is not found.

In other words, if I browse to http://mysite.com/test/ and a physical index or default file is not found at that location then IIS executes my 404 custom error page which parses the url and either displays a page stored in a database, or a notice saying the page cannot be found.

Everything is working perfectly except that IIS will not display the 404 page for the web root index/default page.

There are no files in the web root directory – here are my observed results:

  • mysite.com: Completely blank page
  • mysite.com/: Completely blank page
  • mysite.com/index.aspx: Correctly displays my custom error page.
  • mysite.com/default.aspx: Correctly displays my custom error page.
  • mysite.com/index.htm: Correctly displays my custom error page.
  • mysite.com/anything_else/: Correctly displays my custom error page.

My Web.config file contains:

<httpErrors errorMode="Custom" existingResponse="Replace">
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/_page/" responseMode="ExecuteURL" />
    <error statusCode="403" subStatusCode="14" path="/_page/" responseMode="ExecuteURL" />
</httpErrors>

I would like to store the contents of the home page in a database like the rest of the site’s dynamic pages but after much searching still cannot find out how to get IIS to display my custom error page when the home index/default page is not found.

Any help/thoughts would be greatly appreciated.

fodder

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:57:39+00:00Added an answer on June 2, 2026 at 6:57 pm

    I ended up solving this by using the web root index itself as the custom error page instead of another page like “/_page/”.

    This worked for everything except for SSL redirecting, which I decided was not a big enough issue to hold up the project.

    In the system, every page is explicitly set to either http or https. If a user navigates to an https page using an http address then they are redirected to the https version and vice-versa. However, using the root index as the custom error page means that this redirection won’t work for the home page because IIS will not redirect a page to itself for some reason.

    If anyone has any idea how to get around that problem I’d greatly appreciate your thoughts. But the original question is essentially solved.

    Hope reading this helps someone.

    fodder

    UPDATE – 08/17/2012:

    Well, it took a support call to Microsoft (arduous, but eventually fruitful) but I finally found the answer to the underlying problem

    When I first set up the web server, I did not install the “Directory Browsing” module for security reasons. I didn’t want web clients to be able to see the file structure.

    Well, it turns out that one needs to install the Directory Browsing module (EVEN IF IT IS DISABLED) to make IIS respond with anything besides a 200OK (and generate a blank html page).

    Once installed (and left disabled, for security reasons), IIS now responds with a 403.14 Forbidden error, which I already had correctly redirecting in my web.config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HttpModule that I created and am running on IIS 6 using
I have created a custom activity that I am using in my workflows. Initially
We have a system that runs in IIS. The system should always run using
I have a WCF service that is using a custom UsernamePasswordValidator. The validator needs
I have built a few custom applications that run on WSS 3 using the
I have created a virtual directory on the IIS (IIS 5.1 that's what i'm
I have created a custom Rewrite Provider for IIS 7 following instructions in this
I have a website in IIS 6.0 using an application pool with a custom
I am using IIS 6 on 2003. I have created a HTTP handler dll
I am using IIS V5.1. Integrated windows authentication I have a following web config:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.