Questions tagged [asp.net-identity]

The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems.

The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems. It includes profile support, OAuth integration, works with OWIN, and is included with the ASP.NET templates shipped with Visual Studio 2013.

ASP.NET Identity uses code-first Entity Framework to allow for maximum customization through class manipulation, annotation, and new fluent API.

Useful links

8860 questions
4
votes
2 answers

Failed to change password with UserManager.RemovePassword() and UserManager.AddPassword() in Asp.Net Identity

I use the following code to change a user's password: UserManager userManager = new UserManager(new UserStore(new ApplicationDbContext())); var user = userManager.FindByName(currentUser.LoginName);…
Hiraeth
  • 203
  • 2
  • 11
4
votes
1 answer

IdentityServer3 - which for ActiveDirectory: MembershipReboot / AspNetIdentity / UserService

I hope the following question makes sense: I manage my users in ActiveDirectory. I authenticate them via IdentityServer3. I authorize the APIs via the AD groups that the user is in (acting as security roles). How should I set up…
4
votes
1 answer

ASP.NET 5 MVC6 User.GetUserId() returns incorrect id

I have simple project in ASP.NET 5 with one registered user. I have tried to get id of current logged user by extension method GetUserId() from using System.Security.Claims namespace. Unfortunately this method returns me not existing id and i don't…
Pawel Maga
  • 5,428
  • 3
  • 38
  • 62
4
votes
3 answers

ASP.Net Identity to MVC 6 with INT id Column

Im using MVC6 project with Asp.net Identity and wanted to change the ID column from the string to INT. I Followed this article enter link description here I get an error saying can insert a null into the ID columns for Role and User, but if i revert…
4
votes
2 answers

ASP.NET Identity Manager Error: error when trying to create a controller of type 'MetaController' (no parameterless public constructor)

I got ThinkTecture's IdentityManager running, but now when going to the '/idm/ url I get an error: An error occurred when trying to create a controller of type 'MetaController'. Make sure that the controller has a parameterless public…
Bart
  • 5,065
  • 1
  • 35
  • 43
4
votes
1 answer

How do I get the Google/Facebook first name/surname in ASP.NET Identity?

I'm building an application using ASP.NET MVC and Identity and I have Google logins working, but I'd like to display the user's name (from Google/Facebook), so that rather than the website showing as "Hi fred123@gmail.com" it displays as "Hi Fred".…
Tim Almond
  • 12,088
  • 10
  • 40
  • 50
4
votes
3 answers

ASP.Net MVC 6 + WebAPI Auth - Redirect MVC to logon but 401 if WebAPI

I have a AngularJS + MVC + WebAPI where I'm trying to: - Use standard (individual accounts) for MVC authentication; - Use those same users and password for WebAPI based authentication. Problem, from AngularJS everything works fine, the cookie…
4
votes
0 answers

MVC 5 & Identity 2.2.1 - authentication expiration & password renewal per user

I'm new to ASP.NET MVC 5 and would like my site to be able to: expire the current session and force a log on after m minutes of inactivity oblige the user to enter a new password after d days where m and d are user-specific values stored in the…
4
votes
1 answer

Microsoft Identity password hash is different for the same password

I am using ASP.NET MVC 5 along with microsoft identity. I have a table called AspNetUsers. It has a field called "PasswordHash". i created 2 users with the same password, yet the password hash is different. Why is that i dont understand how it…
TotalWar
  • 335
  • 1
  • 6
  • 16
4
votes
1 answer

Using Active Directory for authentication and ASP.NET Identity for Roles

I have an ASP.NET application that uses ASP.NET Identity 2.2. This was migrated from SQL Membership. In addition to using the AspNetUsers, AspNetRoles, etc tables the application also contains application-specific SQL Server tables which link back…
Phil Haselden
  • 2,876
  • 3
  • 30
  • 25
4
votes
1 answer

MVC External login - How to skip association form

I want to skip external login register - association form I am using google external login with MVC5, If you login with google account, it will show you above screen after entering google credentials first time. I just want to skip this screen.…
vikrantx
  • 593
  • 5
  • 22
4
votes
1 answer

MVC Anti forgery token error on scaffold

I'm recieving the following error: {"A claim of type 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier' or 'http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider' was not present on the provided…
4
votes
1 answer

Getting Data Assigned to Individual Users

I am building an application for the first time using ASP.NET MVC/Web API that has multiple user accounts with 'UserId', 'AccountId', 'ClientId' and 'EventId' as identifying fields. I am able to login the user, retrieve the UserId, but I cannot…
4
votes
1 answer

facebook api version 2.4 not returning email from owin facebookauthentication options?

I have created new facebook app for my application. Now this app is with api version 2.4. I was using below code for login with owin. app.UseFacebookAuthentication(new FacebookAuthenticationOptions() { AppId = "xx", …
Shahbaz Khan
  • 133
  • 1
  • 10
4
votes
2 answers

Disable Input Fields in MVC View on Role Based Authorization using ASP.net Identity

I have overridden AuthorizeAttribute class for role based authorization in our MVC application. [HttpPOST] [CustomAuthorize(Roles = "AddCOA")] public ActionResult Edit([Bind(Include = "N100,S104,S103,S101,S1,S100,D1")] TrM trM) { if…
geekowls
  • 627
  • 7
  • 17