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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:06:13+00:00 2026-06-16T11:06:13+00:00

I’m a starting to learn about MVC4. As first steps, I need to perform

  • 0

I’m a starting to learn about MVC4. As first steps, I need to perform a login since a custom database with just three roles in the database.

Is it realy necessary to implement a custom membership provider? I’m question this because I was reading this post and he’s doing another way: http://patrickdesjardins.com/blog/asp-net-membership-with-mvc4

I just need to get users from a custom database and determine the role.

To determine the rule, is a quite simple. I’ve got two tables called Students and Teachers. Each one has its Id as is loggin Id, and the common property password.

if (db.Students.Where(x => x.StudentId == x && x.Password == y) return "student"
if (db.Teachers.Where(x => x.TeacherId == x && x.Password == y) return "teacher"

// does not exist

Can you orient me about how to implement this features in ASP.NET?

  • 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-16T11:06:14+00:00Added an answer on June 16, 2026 at 11:06 am

    NOTE: Below may not be applicable for .NET Core or ASP.NET Core

    Before you start your research, note that membership and role management has been changed in ASP.NET MVC4. (if you’re using ‘Internet Application’ template from Visual Studio)

    Please read Jon Galloway’s blog post about what has changed.

    New Simple Membership Provider is designed to be extended and overcome issues in the old membership and role management system (which is still supported as it is a part of ASP.NET)

    Both implementations support role management, and you’re free to select either implementation, or roll your own. There are arguments on which is better, and some developers prefer implementing their own, because of the limitations of both. (I won’t go into details, as it can get biased)

    Here’s a tutorial to get you started. [Link].. Please note that tutorial explains the old membership system, and not the new SimpleMembership/WebSecurity method.

    UPDATE

    Just when you think you have enough authentication frameworks, Microsoft has announced OWIN – Open Web Interface for .NET.

    OWIN is a set of interfaces for .NET which are open and pluggable, and this includes authentication. Please refer to this post [Link] on how to use MVC 5 OWIN Forms Authentication.

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

Sidebar

Related Questions

Let's say I'm outputting a post title and in our database, it's Hello Y’all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to

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.