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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:22:19+00:00 2026-06-14T16:22:19+00:00

First off: ASP.NET Web Application project with SQL Server 2008 I have inherited an

  • 0

First off: ASP.NET Web Application project with SQL Server 2008

I have inherited an ancient DB with a table called Security that stores user accounts. The columns are:

ID, name, user_name, password, and access_level.

access_level holds an integer value of 1 to 3 specifying access to certain parts of the web app. These range from 1 = user, 2 = power user, 3 = admin. I will need some users to view some info, hide it for others, and make it viewable+editable for others according to this access level.

I am familiar with older ASP.NET so I am new to the provider model. From what I have read so far I can:

1) create a custom MembershipProvider and RoleProvider and use those

2) create my own login system using hidden text fields to persist data

What is the best way to implement this? I started writing a custom MembershipProvider but it seems overkill for such a simple schema. There has to be a simpler method to implement this. Any suggestions or clarifications are welcome.

  • 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-14T16:22:22+00:00Added an answer on June 14, 2026 at 4:22 pm

    If you do not need to restrict pages based on the authorized roles, you can simply use

    // After custom validation
    FormsAuthentication.SetAuthCookie(username, false);
    

    However, if you want to restrict pages based on the authorized role (in web.config), I’ll suggest to implement Custom MembershipProvider and RoleProvider.

    You just need to override the following methods.

    MembershipProvider

    public override bool ValidateUser(string username, string password)
    
    public override MembershipUser GetUser(string username, bool userIsOnline)
    

    RoleProvider

    public override bool IsUserInRole(string username, string roleName)
    
    public override string[] GetRolesForUser(string username)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an e-trade web application in ASP.NET. To buy anything,first, users have to
I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
I need to write a web application using SQL Server 2005, asp.net, and ado.net.
First off, let me clarify the platforms we are using. We have an ASP.NET
So I have an asp.net Web Application (Not Web Site) that I am trying
I have an ASP.NET MVC 3 / .NET Web Application, which is heavily data-driven,
I have asp.net web service application created in VS 2010. I created this web
First off.. I am new to asp.net and EF. I have an EntityDatsource on
I have a wierd problem with threading in an ASP.NET application. For some reason,
I have an ASP.NET Web Form (C#) that users fill out, it has a

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.