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
3 answers

What is the proper way to Join two tables in ASP.NET MVC?

I've been working on a simple Dropbox-like app, to learn some ASP.NET MVC. But even before getting a page working decently I've gotten stuck, and there's so much info out there I can't see the forest for the trees anymore. My situation: I want to…
Simon Verbeke
  • 2,905
  • 8
  • 36
  • 55
4
votes
1 answer

MVC5 Identity + multiple context in EntityFramework

I have a MVC 5 application, which uses the Default Identity authentication. The user profile is part of our model, which means that there are several class which have a foreign key to the UserInfo. There are 2 DbContext, one for the model and…
4
votes
1 answer

WsFederation and local user mixed authentication

I'm trying make my user login with Azure AD credentials (using OWIN WsFederation plugin) or using a local user account with microsoft asp.net identity in a MVC 5.1 Web App. Login with local users work fine, login using a federated account works only…
4
votes
1 answer

Web API authentication response properties

I am developing a web service using ASP.NET Web API. I am using ASP.NET Identity for authentication and token generation. I need to return an extended property in token response json. Till now I am able to return an extended string property in which…
Haider
  • 1,488
  • 2
  • 15
  • 29
4
votes
3 answers

Asp.net Identity 2.0 temporary password

In my MVC application user registration is implemented in two ways; the user register and then approved by the Administrator; or the Administrator can create a user. My question is: will it be possible to send a temporary password and then the user…
hncl
  • 2,295
  • 7
  • 63
  • 129
4
votes
1 answer

Manage 2 levels of authentication with Asp.Net Identity 2.0

I'd like to be able to manage 2 levels of authentication for my asp.net app users. The idea is that users could login permanently with a "remember me" option and access some user pages without very sensitive data, but they would have to re-enter…
Dawmz
  • 344
  • 1
  • 3
  • 6
4
votes
2 answers

ASP.NET Identity How to round-trip a custom Claim in the cookie without adding it to the datastore?

Using ASP.NET Identity 2.1.0, I'm trying to add a custom Claim so that it gets added to the round-tripping cookie, and not be added to the datastore. The Claim is for a unique Session Id, unique login, even if for the same UserId (in order to have…
stacker
  • 183
  • 11
4
votes
1 answer

How to test Asp.Net Identity UserManger CreateAsync

I am trying to test for failure conditions of my Account controller. When i run the test in debug mode, i am not seeing an expected result. I am expecting to return a failed identity result when reach the line of code to create a user async. …
Michael
  • 1,022
  • 1
  • 11
  • 28
4
votes
1 answer

Identity 2.0 Web API generate token for client

I am developing ASP.NET Web API application. I need to authenticate users by login and password and return string token back in response. I need to have attribute [Authorize] working. I tried to investigate, how to do it using BearerToken mechanism,…
4
votes
2 answers

Populating SecurityStamp for legacy users in database in ASP.NET Identity

I have a legacy database that I am using with ASP.NET Identity. In order to use the Identity functions a SecurityStamp value is required in the database for each user. Some have mentioned in other questions relating to this that the value can be…
Luke
  • 22,826
  • 31
  • 110
  • 193
4
votes
1 answer

Referencing an Identity user in another context

I'm fairly new to the Entity Framework, and am working on a project that is making use of the Entity Framework 6, Identity 2, Web Api 2 and MVC 5. In the initial workings of the project, I have created a BusinessConnectionsContext to represent the…
Reuben
  • 4,136
  • 2
  • 48
  • 57
4
votes
2 answers

Extending IdentityUserRole in Identity 2.0

So my system requires that Roles have associated Expiry dates. I have implemented the Identity 2.0 framework, and things are going smoothly, but I've run into an issue that is making me doubt my structure. public class ApplicationUserRole :…
adam3039
  • 1,171
  • 14
  • 27
4
votes
0 answers

asp.net Identity 2.1 sometimes fail to log in

Visual studio 2013, Asp.net Identity 2.1.0 Most of the time user can log in without problem, but sometime user cannot log in. This is hard to reproduce. When user failed to log in, the menu (that only shows when user logged in) do not appear, and…
Hiraeth
  • 203
  • 2
  • 11
4
votes
1 answer

Azure AD versus .NET Identity 2

What are the pros/cons of using .NET Identity 2.1 versus Azure Active Directory (Premium)? We currently have an MVC 5.x application using Identity 2.1 for registration, sign-in, password resets, etc. A Microsoft consultant is suggesting we should…
4
votes
2 answers

ASP.NET Identity: use GeneratePasswordResetToken on Azure website

I have my web application deployed on Microsoft Azure. However when I want to generate a PasswordResetToken with: var token = await _userManager.GeneratePasswordResetTokenAsync(user.Id); I get the following…