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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:19:34+00:00 2026-05-19T16:19:34+00:00

MVC newbie question: I’ve got my project up & running, and all working fine.

  • 0

MVC newbie question: I’ve got my project up & running, and all working fine. Now I want to start restricting access to certain views – and even whole controllers. I know that the VS 2010 package comes with a standard, built-in security module, including a little shrink-wrapped database that stores your usernames and passwords for you, lest – Heaven forfend! – you use a non-standard approach.

Well, I don’t want to use the built-in security. I’ve got my own user tables, and I know how to encrypt the passwords myself, thank you very much. All I want to do is have a login method, and if I determine that the login was successful, then I want to set the session as authenticated, and allow the user to access the restricted views. Shouldn’t be too difficult, right?

I’ve Googled for MVC security; the problem is not lack of information, but rather too much of it… so if anyone can just cut through my personal OutOfMemoryException and give me a “Quick Start” applicable to my situation, I’d really appreciate it…

  • 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-19T16:19:35+00:00Added an answer on May 19, 2026 at 4:19 pm

    One of the nice things about ASP.NET is that it is very extensible. Yes, the default model for authentication and authorization is to use the ASP.NET provided membership tables (either in a separate database or added to your own). Luckily, there is a way around that.

    The easiest (and proper) way to achieve what you’re looking to do is to create a custom MembershipProvider that uses your existing database. Doing so will allow you to plug your custom authentication logic into the existing ASP.NET MVC authorization framework which means you can still control access to your Actions via attributes in your Controllers:

    MSDN – Implementing a Membership Provider

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

Sidebar

Related Questions

Hey all, this is a newbie ASP.NET MVC question. I have a view that
MVC newbie question re binders. Supposing I have two strongly typed partial actions that
Yet another newbie with ASP.NET MVC! All I intend to do is for a
I'm a newbie to all this ASP.NET MVC stuff, and I was making some
I'm a newbie. I want to ask about the MVC model for separation of
I am a newbie to ASP.net & MVC 2, and have understood the basic
Code is working fine but i want to add my own location . for
Newbie question. I’m writing an ASP.Net MVC app in VB.Net and have been using
this is a really newbie question: How can I output XML with Spring MVC,
MVC Newbie here. I want to get User confirmation before controller action (update 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.