Questions tagged [asp.net-identity-2]

The second release of the ASP.NET Identity system which was designed to replace the previous ASP.NET Membership and Simple Membership systems. Use this tag if your question deals specifically to ASP.NET Identity 2 features. The [asp.net-identity] tag should be used if your question is not specific to ASP.NET Identity 2.

Resources:

Announcing RTM of ASP.NET Identity 2.0.0

1063 questions
0
votes
3 answers

Custom Identity 2.x Hooking Into OWIN Pipeline - Multi-Tenant SaaS Application

Question: Can we simply hook into the OWIN pipeline to set and retrieve the security authentication ticket (cookie)? I'm searching for the best approach to roll our own security/membership for an MVC 5 application. I have no issue with registration,…
Richard
  • 864
  • 2
  • 10
  • 21
0
votes
1 answer

How to find all ApplicationRoles of a user in asp.net identity 2.0

I tried following code to get all the roles object (i.e. ApplicationRole not the IdentityUserRole) of a user. string userId = User.Identity.GetUserId(); var RoleManager = this.HttpContext.GetOwinContext().Get(); var…
Waqar
  • 624
  • 1
  • 7
  • 20
0
votes
1 answer

Change password validation rules after application starts

Can I update my application validation rules after startup? I tried something like this, but I got stuck in how I'll persist that Information. public void UpdatePasswordValidation(SystemConfig config) { var manager =…
wallybh
  • 934
  • 1
  • 11
  • 28
0
votes
0 answers

Identity Server 3 Asp.Net Identity Sampe: Refresh Tokens

I am using the Identity Server 3 Sample for Asp.Net Identity, which is working fine and I was also able to make it generate refresh tokens to renew the access tokens. So here is my question. One of the main points of having refresh tokens is that we…
Behrooz
  • 1,895
  • 4
  • 31
  • 47
0
votes
2 answers

How to get user from Asp.Net Identity 2?

I'm fairly new with MVC and completely new with Identity 2.0. I'm trying to create a way to Edit a user and I'm not having much luck. Ultimately I would like to use a POCO class I created called Member so that I can shape the way the data will be…
Caverman
  • 3,371
  • 9
  • 59
  • 115
0
votes
1 answer

Multiple object sets per type are not supported on MVC 5 ASPNET IDENTITY. But i have only one DbSet existing in the whole project

I am trying to make a login for a web app. The database was already existing so i used the instructions here to customize the table upon which the login would be performed. There were an error or two that i managed to fix(?) and now i am stuck in…
lefteris
  • 13
  • 5
0
votes
1 answer

Can I have an self referencing inverse navigation property with optional foreign key?

ASP.NET Identity developers should recognize my renamed ApplicationUser class (now called User) derived from IdentityUser which has a Guid-based Id property. In my User class I have an optional self referencing foreign key (public Guid? ManagerId)…
jlavallet
  • 1,267
  • 1
  • 12
  • 33
0
votes
3 answers

Where is my MVC 5 code-first database created? (not using AttachDbFilename)

I have the following connection string in my MVC 5 weApp:
0
votes
1 answer

Where to set DBContext static property for an Entity Framework global filter?

I'm attempting to build a multi-tenant MVC web application which is so far progressing quite well. In my application I've extended asp.net Identity 2 User properties to include an OrganisationId, where each users created is assigned against to an…
RobHurd
  • 2,041
  • 7
  • 26
  • 34
0
votes
1 answer

error with getting all users in role

I'm trying to get a list of all users in a role, and despite the numerous questions and links I've read on here, I can't seem to figure this Identity stuff out. Below is what I'm currently working with: IdentityRole role = context.Roles.Where(x =>…
0
votes
0 answers

Owin .AspNet.Correlation.*cookie not found issues

I'm using .net. 4.5.2 and latest version on Identity in my application. There are cases I get strange error from external login ".AspNet.Correlation.Google cookie not found." In the logs I see the the I see the url "/signin-google?state=STATE FROM…
Arnold
  • 89
  • 1
  • 11
0
votes
1 answer

My user isn't logged out after the session expires using asp.net identity 2.0

I have a MVC application using Identity 2 for authentication. After I log in, if I close the browser and then open the application again, there are 3 problems occurring. The user isn't redirected to the login page The session still contains some of…
Jeff Finn
  • 1,975
  • 6
  • 23
  • 52
0
votes
0 answers

UserManager doesn't recover stored Roles from user ( Identity 2.1 ASP MVC 5)

The roles stored in the database are not recovered by UserManager.GetRoles(userId); I have use Identity before and never happend this... don't know what I have done this time or what's happening... How I create user and his role: var result =…
0
votes
1 answer

Identity 2.0 Adding extra Email column

When I try to log in to my development site, I get a weird error: Invalid column name 'Email1'. I've made derived classes for a number of different ASP.NET Identity 2.0 classes, namely: public class MyUser : IdentityUser
sshirley
  • 239
  • 2
  • 6
  • 19
0
votes
0 answers

Custom filter attrbiute access RoleManager

I want to build a custom filter attribute that inherits AuthorizeAttribute. In a normal MVC controller I can do like this: private ApplicationRoleManager _roleManager; public ApplicationRoleManager RoleManager { get { …
user2818430
  • 5,853
  • 21
  • 82
  • 148