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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:16:08+00:00 2026-05-31T13:16:08+00:00

I am wondering what is the simplest and fastest way I can do authentication

  • 0

I am wondering what is the simplest and fastest way I can do authentication in asp.net mvc?

I currently am making a site and want to launch it soon. The site is more like a test run and see if the idea will stick. I don’t want to spend time working on an an elaborate authentication such as using openId/openAuth for my admin section just yet.

In the future I see users will need to log in as well and this is when I would implement something more to the admin section as well.

Right now I just want something that can stop anyone but me from getting to that area. If possible I rather not even have a html form with a username or password to type in the credentials.

I was looking at the security box but not sure if I can use this or if this some forms authentication or what.

enter image description here

  • 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-31T13:16:09+00:00Added an answer on May 31, 2026 at 1:16 pm

    The easiest, if you want support for multiple users right now, is the MembershipProvider

    First step is use the aspnet_regsql command to generate membership tables in your database:

    aspnet_regsql -S localhost -d “your_database_name” -A all -U sql_username -P sql_password

    From there, it’s just a matter of adding the membership provider config to your web.config (and setting the options you want, like number of invalid password attempts, strength requirements, etc.):

    <add name="AspNetSqlMembershipProvider" 
         type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, 
         Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
         connectionStringName="ApplicationServices" 
         enablePasswordRetrieval="false" 
         enablePasswordReset="true" 
         requiresQuestionAndAnswer="false"  
         requiresUniqueEmail="true" 
         passwordFormat="Hashed" 
         maxInvalidPasswordAttempts="5" 
         minRequiredPasswordLength="6" 
         minRequiredNonalphanumericCharacters="0" 
         passwordAttemptWindow="10"      
         passwordStrengthRegularExpression="^.*(?=.{6,})(?=.*\d).*$"  
         applicationName="/" />
    

    and adding the [Authorize] attribute to any controllers you want protected. The default ASP.NET MVC project comes with Membership and Forms Authentication already built in. You could copy/paste the Account controller, the Account models, and the web.config section and have a fully built authentication and registration system within a few minutes. This even includes password reset, disabling accounts, profiles, roles and access control (i.e. [Authorize(Roles = “Admin, Super User”)]) means a user must be authenticated, and in the Admin or Super User role.

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

Sidebar

Related Questions

I'm wondering what is the best (fastest and simplest) way to have a textfield
I was wondering what is the simplest way of making just plain text act
I'm wondering what is the simplest way to fill a div by grabbing a
I was simply wondering what would be the simplest and most efficient way of
I was wondering what the simplest way is to convert a string representation of
I'm developing rails on localhost and wondering what is the simplest way, in terms
I was wondering which is the simplest and most configurable way to obtain what
I was wondering what the simplest way would be to implement an array who's
I'm wondering what is the simplest way to get the current price of a
Wondering what the best / good way of doing this would be in jQuery.

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.