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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:34:47+00:00 2026-05-14T07:34:47+00:00

I am using following setting for customErrors in my web.config. <customErrors mode="On" defaultRedirect="GenericErrorPage.aspx" >

  • 0

I am using following setting for customErrors in my web.config.

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

I have a folder "Admin" having access to administrators role. When someone other than administrators tries to access the pages inside admin folder, it is redirected to login page. My expectation is to display "NoAccess.aspx".

Whats wrong with this code? Or is there another meaning to statusCode 403.

  • 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-14T07:34:48+00:00Added an answer on May 14, 2026 at 7:34 am

    If you’re using IIS 7 then the error pages should be set here:

    UPD:
    Ok, after reviewing the question I realised that the problem is in something else..
    By default the authentication system in ASP.NET redirects all 403 requests to the login page. This is the way it’s coded, and yes, it ignores the we.config settings.

    There are solutions, of course.. You can check an example of how it was solved here ( similar question of SO )
    With ASP.NET membership, how can I show a 403?

    Good luck!

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

Sidebar

Related Questions

Using the following Eval script for setting ID property causes error. Error message: the
using the following code context.Response.StatusCode = 301; context.Response.Redirect(newUrl, true); context.Response.End(); I can see in
In my ASP.MVC 2.0 website I have the following setting in web.config: <globalization uiCulture=da-DK
I am setting the row height of my UITableView using following code [tableView setRowHeight:
I am generating the scala AST using the following code: val setting = new
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
I'm using the following config: ActionMailer::Base.smtp_settings = { :address => smtp.gmail.com, :port => 587,
Hi I am using following code in the MAC application for setting font of
If I use the following setting, I am unable to use Server.Transfer()/Response.Redirect() to redirect
I have implemented an error style for textboxes using the following code. This sets

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.