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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:25:50+00:00 2026-05-27T07:25:50+00:00

I’ve found a few pages concerning this on Google and on here but none

  • 0

I’ve found a few pages concerning this on Google and on here but none have seemed to have fixed the issue that I’m seeing. I’m using IIS 7.5. The website uses windows authentication and to access any of the site the user must be logged in (occurs automatically when the first page is loaded). If the user does not have access to the site then they should get a 401 or a 403, I’m trying to create a simple htm custom error page for this. The error page is in an Errors folder which has anonymous authentication set up on it.

If I try to load the site and force failed authentication then I just get the standard Server Error page with a HTTP Error 401, it doesn’t look like it’s trying to load the error page. If I try to load the error page itself then that works fine.

There are no authorisation bits, if a user is logged on then have access to the whole site and if the user can’t authenticate then they have access only to the error page. I’ve added the following section to my web.config:

  <customErrors mode="On" defaultRedirect="~/Errors/AuthenticationError.htm">
      <error statusCode="401" redirect="~/Errors/AuthenticationError.htm" />
      <error statusCode="403" redirect="~/Errors/AuthenticationError.htm" />
  </customErrors>

Any help would be very much appreciated!

  • 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-27T07:25:50+00:00Added an answer on May 27, 2026 at 7:25 am

    OK I’ve managed to crack this, IIS 7.5 seems to happily ignore customErrors so httpErrors has to be used in the system.webServer section. You also seem to have to declare errorMode=”Custom”. My resulting code block is:

    <httpErrors errorMode="Custom" defaultResponseMode="File">
      <remove statusCode="401" subStatusCode="-1" />
      <remove statusCode="403" subStatusCode="-1" />
      <error statusCode="401" path="Errors\AuthenticationError.htm" />
      <error statusCode="403" path="Errors\AuthenticationError.htm" />
    </httpErrors>
    

    I have a feeling that this sets the entire site to use non-detailed error pages even on pages that aren’t included in the section. There is an option to show custom errors remotely and detailed errors locally so that may be a possible work-around.

    This webpage is the best one that I found that highlighted all this.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
this is what i have right now Drawing an RSS feed into the php,
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.