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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:36:32+00:00 2026-06-06T19:36:32+00:00

Coding Platform ASP.NET 4.0 WebForms on IIS7.5 If I request a page blahblah.aspx which

  • 0

Coding Platform ASP.NET 4.0 WebForms on IIS7.5

If I request a page blahblah.aspx which does not exist, I get navigated to my custom error page for Page not found Exception. I have implemented URL routing and so I have omitted all my .aspx extensions for routes.

Now, If I type www.mysite.com/blahblah (thats a url without extension) instead of going to my custom error page, it gets redirected to my IIS 404 error page.

What should I do to make my custom error page appear on my site instead of IIS error page?

  • 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-06T19:36:34+00:00Added an answer on June 6, 2026 at 7:36 pm

    The Easy Way

    If your IIS 7 web server doesn’t already have it, install the IIS 7.0 Administration Pack from Microsoft.

    Navigate to the root web server name in IIS, and open the Configuration Editor (part of the Administration Pack). Change the dropdown to system.webServer/httpErrors, right-click on defaultPath, and choose 'defaultPath' Attribute -> Unlock Attribute.

    Unlocking the defaultPath attribute

    Then try to change the custom error handler page again. Navigate to your site, open Error Pages under the IIS group, click Edit Feature Settings on the right, select Custom error pages and finally, put in your path for the default page.

    Setting custom error pages

    No lock error this time.

    I originally tried to unlock this attribute at the web site level but was prevented, so be aware you may have to go all the way to the root of the IIS tree, the web server itself.

    The Manual Way

    I know you can accomplish all this by direct editing in notepad of the appropriate config file on the web server. And that may be required for your particular web hosting environment or company production web server change protocols. But why make it complicated if it doesn’t need to be? Plus, this way you can do it in the GUI, and compare the before and after to see what changes you truly have to make. But if you MUST do it manually, then:

    Open the file %windir%\System32\inetsrv\config\applicationHost.config in Notepad. Run Notepad as administrator if you’re having problems.

    Pro tip: Do not use notepad++ to edit applicationHost.config. You’ll end up secretly and silently saving a 32-bit copy of the file that’s in a different folder than the one IIS looks in (due to Windows, not np++) without actually affecting the file you wish to change.

    You’ll see something like this:

    <httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
    

    Remove the ,defaultPath section and save.

    You will be able to make the changes you need.

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

Sidebar

Related Questions

Coding Platform ASP.NET 4.0 WebForms I have two pages that are relevant here Login.aspx
Coding Platform: ASP.NET 4.0 WebForms with C# We have a website with the existing
Coding Platform: ASP.NET WebForms4.0 VB Installed Facebook and FacebookWeb and when I run the
Coding Platform: ASP.NET 4.0 C# Consider the following scenario. I am uploading a file
Coding Platform: ASP.NET C# Controls Used: asp:Wizard and asp:Button I have a asp:Wizard and
Coding Platform: ASP.NET C# I have an XML like this. <Items> <Map id=35> <Terrains>
Coding footer naively, if there's not enough content, then there will be empty space
After coding and testing a Java application (lets say with Eclipse, but not necessarily)
When coding, I use Dropbox to sync folder in which I keep my projects
As an ASP.NET developer, I'm used to working with how VS/C# transparently autogens proxy

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.