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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:42:19+00:00 2026-06-11T23:42:19+00:00

I have been trying to have my web app to redirect to a custom

  • 0

I have been trying to have my web app to redirect to a custom 404 page. It works for all urls except if they have a “.aspx” extension

The server is a Windows Server 2008 and here are the following settings I have in my web.config (using google.com as a quick example):

<customErrors defaultRedirect="http://www.google.com" mode="On" redirectMode="ResponseRedirect"></customErrors>

<httpErrors errorMode="Custom">
<clear />
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404-Page/" responseMode="ExecuteURL" />
<error statusCode="500" prefixLanguageFilePath="" path="/404-Page/" responseMode="ExecuteURL" />
</httpErrors>

Again the HTTP Errors work for everything but extensions of “.aspx”

  • 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-11T23:42:21+00:00Added an answer on June 11, 2026 at 11:42 pm

    Well to solve this issue, we ended up having to create a module that hijacks any errors and transfers the user to my custom 404 page that is set in the web.config (under customErrors). The module would add an event handler to whenever the application gets an error:

        public void Init(HttpApplication context)
        {
            context.Error += new EventHandler(FileNotFound_Error);
        }
    

    And the function FileNoteFound_Error does the redirection.

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

Sidebar

Related Questions

I have been trying to set up a DatabaseConnectionPool for a web app for
All this weekend I have been trying to setup a Rails 3.0.4 app in
In my Windows 8 app, I have been trying to include a web image
I have been trying to setup git for our web development team unsuccessfully. Some
I'm working on a web-accessible API and have been trying to figure out the
I have been tearing my hair out of late trying to get my web
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have been using selenium IDE to do some web app testing. I have
I'm trying to build my Flex/Java web app from within IntelliJ rather than have
I've been trying to create web app in Ruby on Rails, which would collect

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.