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

  • Home
  • SEARCH
  • 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 3942848
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:42:43+00:00 2026-05-20T00:42:43+00:00

Hey, I am building a content management system and so far I am trying

  • 0

Hey,
I am building a content management system and so far I am trying to get a member’s area to work. I figured out the CreateUserWizard and the Login controls. I also used Roles.AddUserToRole(RegisterUser.UserName, "Member"); upon account creation to assign the user the role of a “Member”. I have been googling but I havent been able to find a solid way on how to restrict either a directory or a page to make it so that only “Member” users can access it, otherwise redirect to login page. Can anyone give me an idea for this? Also I had a related question, when I go on to the site and I am NOT logged in, what is my default role? is it guest or just null?

Thanks!

  • 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-20T00:42:44+00:00Added an answer on May 20, 2026 at 12:42 am

    Non-logged-in users have no roles.

    You can restrict specific areas of your site in Web.config.

    First, disallow access to the entire site:

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

    You can then selectively grant access to specific areas using the <location> element:

    <location path="Login.aspx">
        <system.web>
            <authorization>
                <allow users="?" />
            </authorization>
        </system.web>
    </location>
    <location path="SomeFolder/">
        <system.web>
            <authorization>
                <allow roles="Member" />
            </authorization>
        </system.web>
    </location>
    
    • users="?" means anonymous (non-logged-in) users
    • users="*" means all logged-in users.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey so I'm building an iOS app. The fist window is a login screen
Hey guys I'm building my first website and I cannot figure how to get
Hey I've had nonstop problems with SQL. I'm trying to get some experience because
Hey, I'm building a four tier software system (Presentation - JSP, Problem Domain, Application
Hey all, I'm looking at building an ajax-heavy site, and I'm trying to spend
Hey I'm trying to figure out a regular expression to do the following. Here
Hey. We're building a large ASP.NET website, and have hired an external firm to
Hey guys. I'm building a simple blog and have my data returning from my
EDIT: This problem has been solved. See below. Hey all. I'm building an iPhone
Hey I am new to PHp and I am trying to enter details into

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.