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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:44:33+00:00 2026-05-27T06:44:33+00:00

Looking for the best practice for authentication in MVC I unfortunately didn’t find the

  • 0

Looking for the best practice for authentication in MVC I unfortunately didn’t find the clear answer to my question. Thinking of the problem I tried to imagine some principles that could be useful in my design.
Well,

  1. I would like to use a base AccountController class
  2. I want to place all the tables such as “Users”, Roles, Rights etc into my own database. But I wouldn’t like to implement the standard aspnetdb design (which can be easy got by using aspnet_regsql)

So the main question is can I do this without deriving abstract classes like MembershipProvider, RoleProvider etc? What I would prefer not to do is implement all the abstract methods from these classes.

The second question is still about the best practice for authentication e.g. for the small projects, for the large ones?

  • 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-27T06:44:34+00:00Added an answer on May 27, 2026 at 6:44 am

    You can actually get most of the basic required functionality working without implementing every method in MembershipProvider and RoleProvider

    Just use throw new NotImplementedException(); as the body of properties/methods you aren’t going to use.

    My custom membership provider just provides real implementations for

    • bool ChangePassword(string username, string oldPassword, string newPassword)
    • MembershipUser GetUser(string username, bool userIsOnline)
    • bool ValidateUser(string username, string password)

    and throw new NotImplementedException(); for the rest.

    Likewise, my custom role provider just implements

    • string[] GetRolesForUser(string username)

    With this I can use the basic built-in authorization and authentication without to much effort.

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

Sidebar

Related Questions

Really I guess I am looking for a best practice answer. I like to
I am looking for a best practice for End to End Authentication for internal
I'm looking for a best practice approach to the following problem. I'd like peoples
I'm looking for a best practice pattern which helps me with the following problem.
I am looking for best practice for uploading excel data in Sql server 2000
I'm just looking for best practice reassurance on working with jQuery and ASP.Net, before
Looking for a best-practice advice: Let's suppose I have a Account object with limit
I'm looking for a best practice suggestion. I've got a ShoppingBag Controller with a
I'm looking for a best practice advice how to speed up queries and at
I am looking for the best practice of handling inter project dependencies between mixed

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.