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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:07:40+00:00 2026-05-17T16:07:40+00:00

I just start to learn web programming using IIS 7.5 in windows 2008 R2,

  • 0

I just start to learn web programming using IIS 7.5 in windows 2008 R2, and ASP.Net 4.

I notice that both IIS and ASP.Net can define Authentication rules. In IIS, there is a form authentication setting where I can redirect user to specified page for authentication, like below:

alt text

And then, in ASP web.config file, I find similar settings:

<authentication mode="Forms">
  <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>

When I finish both settings, I assume any page request will be redirect to the login.aspx page. But it didn’t. So I am confused. How do the 2 sets of configs work together? And why page request is not redirected?

Thanks

Update

Finally I get it working and I think I understand it now. My website structure is like below:

alt text

It is about modifying Autherization rules. Deny all unauthorized users for root:

    <authorization>
        <deny users="?" />
    </authorization>

CSS files should be allowed for all users, so I have Styles\web.config:

    <authorization>
        <allow users="*" />
    </authorization>

and only allow unauthorized users to access register.aspx, so I have Account\web.config:

  <location path="Register.aspx">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

  <system.web>
    <authorization>
      <deny users="?"/>
    </authorization>
  </system.web>
  • 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-17T16:07:41+00:00Added an answer on May 17, 2026 at 4:07 pm

    There’s another component you need to configure: authorization. If you don’t, unauthorized users have access to all pages and will not be redirected to the login page. For example:

    <authorization>
        <deny users="?" />
    </authorization>
    

    This specifies that all unauthenticated users are denied access to pages in your application. The authorization element is part of the system.web configuration section.

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

Sidebar

Related Questions

So here I am just about to start a big project using LINQ to
How do I fix a broken debugger, one that just won't start, in EclipseME
Before I start with the real question, let me just say that I might
I'm just learning how to do things, and want to start using some sort
Apache just fails to start with NO error message when we try to reboot
I'm working on a project which is just about to start, and since I
Right now we just use something like this stopWatch.Start(); try { method(); } finally
I'm just trying to time a piece of code. The pseudocode looks like: start
For RMI on server-side, do we need to start rmiregistry program, or just call
Just what the title says, I need to change the password for an existing

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.