I want to create a login page using membership in mvc 5, if the username and password are correct the user will be redirected to a page related to the role (superuser-admin-user). what I have done so far is perform a create new user page where users
create a username password and role from a dropdownlist.what’s next??
are you using VS 2013 ? if yes then why not to create new asp.net mvc project, and click on chnage authentication ,, select "Individual user account", this will automically create register, chnagepassword,login,external login realted views and action methods
..
if you are using visual studio 2012. you can select to create Internet Project templete and it will gives you all the features you are looking for.
for you custom redirection, just modify the Post login action method to redirect you to the place you want superuser-asmin-use.r..
how can I make use of the identity 2.1.0 role?I want to assign a role to every user logging in
Hi lolo512,
lolo512
how can I make use of the identity 2.1.0 role?I want to assign a role to every user logging in
Please refer to:
# Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5
Best Regards
Starain
"This article focuses on customizing and modifying version 1.0 of the ASP.NET Identity framework. If you are using the recently released version 2.0, this code in this article won’t work. "
I’m sorry but I was clear I need the identity 2.1.0
thank you though
Hi lolo512,
The link that I provide has provide the articles for ASP.NET Identity 2.0.
If you are using the Identity 2.0 Framework: This article focuses on customizing and modifying version 1.0 of the ASP.NET Identity framework. If you are using the recently released version 2.0, this code in this article won't work. For more information on working with Identity 2.0, see ASP.NET Identity 2.0: Understanding the Basics and ASP.NET Identity 2.0: Setting Up Account Validation and Two-Factor Authentication. Many of the customizations implemented in this article are included "ini the box" with the Identity Samples project. I discuss extending and customizing IdentityUser and IdentityRole in Identity 2.0 in a new article, ASP.NET Identity 2.0: Customizing Users and Roles
# ASP.NET Identity 2.0: Customizing Users and Roles
http://typecastexception.com/post/2014/06/22/ASPNET-Identity-20-Customizing-Users-and-Roles.aspx
Best Regards
Starain