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 7248715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:10:34+00:00 2026-05-28T22:10:34+00:00

In my ASP.NET 3.5 Website which is published in shared hosting provider , I’ve

  • 0

In my ASP.NET 3.5 Website which is published in shared hosting provider , I’ve configured my web.config file like this :

    <customErrors mode="On" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="AccessDenied.htm"/>
        <error statusCode="404" redirect="FileNotFound.htm"/>
    </customErrors>

If the user request pages that doesn’t exist ( like “www.example.com/NotExistPage.aspx” ) , user will be redirected to FileNotFound.htm page as we expect .

But if the user request some address like : “www.example.com/NotExistDirectory” without .aspx extension , the user will encounter IIS 7.5 Error page :

HTTP Error 404.0 – Not Found The
resource you are looking for has been
removed, had its name changed, or is
temporarily unavailable.

Detialed error information :

Module  IIS Web Core
Notification    MapRequestHandler
Handler StaticFile
Error Code  0x80070002

Requested URL   http://www.example.com:80/NotExistDirectory
Physical Path   D:\Websites\example\example.com\wwwroot\NotExistDirectory
Logon Method    Anonymous
Logon User  Anonymous

This is a yellow page which is not user friendly and we didn’t expect .

I’m wondering setting customeError in webconfig doesn’t support this type of address or not ? How can i prevent users seeing this yellow page .

Edit :
Thanks to David’s answer , But I found the actual reason and correct solution. Please see my answer.

  • 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-05-28T22:10:35+00:00Added an answer on May 28, 2026 at 10:10 pm

    @Mostafa: I faced the exact same problem. I found out it can be solved by adding the following to the web.config file:

    <system.webServer>
        <httpErrors errorMode="Custom">
          <remove statusCode="404" subStatusCode="-1" />
          <error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/MyErrorPage.aspx" responseMode="ExecuteURL" />
        </httpErrors>
      </system.webServer>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing ASP.NET website which I would like to painlessly add CMS
I have an asp.net website which contains a few pages that I'd like to
I have published an ASP.NET web site which targets ASP.NET 3.5 to a W
I am building an ASP.NET website which will collect data from a user and
Imagine an ASP.NET website which displays stock prices when a user logs in. Can
I have an ASP.Net website which has a remember me feature for Login page.
I'm working on an ASP.NET website which targets desktop browsers. We want to enable
I'm developing a new ASP .NET website which is effectively a subset of the
I have an ASP.Net hosted website which displays a list of results as a
Is it advisable to implement url routing for an asp.net(webforms) website which is one

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.