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

foreign key to application user id throwing key errors when updating database

I'm using code first to create a foreign key on YogaSpace that links the ApplicationUsers id to ApplicationUserRefId in the YogaSpace class. So every time I create and insert a new YogaSpace it fills the ApplicationUser id with the id of the person…
0
votes
1 answer

Add role to new user not working

I updated the Identity 2.0 code to add my own user properties for first and last name and then add a user to default role "user". var account = new AccountController(); account.UserManager.AddToRole(user.Id, "user"); However, it does not work and…
Craig Roberts
  • 171
  • 1
  • 4
  • 18
0
votes
1 answer

List of values as a user attribute

I'm using identity 2.1.0 in ASP.NET MVC 5 application, and I have pages for admin to work (create/edit/delete user) with some custom user properties I defined. However I need to store a list of values in one field. How can I achieve this by using…
Milan M.
  • 959
  • 3
  • 12
  • 27
0
votes
1 answer

Create User and associate with an Entity

NET Identity and also MVC5, I want to be able to extend the Post Action for Register so that it the user can be registered and also create a new entity of type Business which has a member of list of users, I want to add the user that has been…
user3836415
  • 952
  • 1
  • 10
  • 25
0
votes
2 answers

Renaming Identity Tables and Maintaing Relationship

I extended the IdentityDBContext to rename the table names, but it looks like i lost the many to many relationship between the users and roles. The LINQ is not picking up the right relationship anymore (p.s. see the intellisence…
Yehia A.Salam
  • 1,987
  • 7
  • 44
  • 93
0
votes
1 answer

ASP.Net Identity Model

I'm creating a login mechanism for multiple types of users. My primary users are companies and students at the moment. Students have specific permissions such as editing their employment history, education, etc. Companies also have specific…
fbhdev
  • 526
  • 7
  • 17
0
votes
1 answer

mvc 5 GetUserId is NULL after loggin

I use external providers for Logging, and I need to setup some user data immediately after user logged in. Class AccountController has method ExternalLoginCallback, but after successful SignIn, I can't get UserId. (Method User.Identity.GetUserId()…
Igor
  • 381
  • 3
  • 17
0
votes
1 answer

Added Thinktecture Identity Manger package via NuGet - now how to I access the admin panel?

I added Thinktecture Identity Manager via Nuget. Now what do i do next? All the of the screen caps I have seen show access to the admin panel via utr like `http://localhost:17457/#/list' That's what i see at Hanselman's blog and also over at Brock's…
Ashok Padmanabhan
  • 2,110
  • 1
  • 19
  • 36
0
votes
0 answers

Using windows forms Application validate user that was created using mvc 5 identity

Using MVC5 with Identity 2.0, I have a created a user in a database using the register option. Now a record for this user is stored in table AspNetUsers. I can now create a simple Windows Forms application that will accept username and password. But…
ary
  • 939
  • 2
  • 13
  • 32
0
votes
1 answer

Is it a bad practice to have a separate role for each user?

Consider the well known example data-model that contains courses and instructors. A course has one instructor has many courses. Suppose now we want to base this model on the ASP.NET Identity model which has users and roles. A straightforward way…
Daniel C. Weber
  • 1,011
  • 5
  • 12
0
votes
2 answers

Customizing asp.net identityrole is creating additional table in migration script

I am trying to customize identityRole table to add a new property , but it is creating a new table script instead of creating the property in the script . How can I generate the script which uses the db.tb_appRoles table instead of both …
Chandan
  • 1,486
  • 2
  • 15
  • 24
0
votes
0 answers

Web Api 2 authorization by subscription

In our Web Api 2 system, Users belong to a Subscription: public class ApplicationUser : IdentityUser { public Guid SubscriptionId { get; set; } } Users can only view data from within their owner subscription. If a user does not belong to a…
Dave New
  • 38,496
  • 59
  • 215
  • 394
0
votes
1 answer

asp.net Identity classes from Entity Framework

Am I able to use Entity Framework models (Classes) as a classes for asp.net Identity so the relations that I have in my database will be loaded when I retrieve the user and if I update any columns or add tables I only have to deal with Entity…
0
votes
0 answers

Associate ApplicationUser with Model

I'm developing a simple MVC 5 application using Entity Framework 6 in Visual Studio 2013. I want to associate users (from ASP.NET Identity 2.0) with my own models in the following manner: There are two types of users (roles), an author and a grader.…
Alonso Arellano
  • 41
  • 1
  • 2
  • 4
0
votes
1 answer

Email Confirmation ASP.NET Identity 2 OWIN MVC and API Invalid Token

I'm attempting to get ASP.NET Identity 2.0 working for email validation. The user account is created successfully, and a validation email is sent. If i validate the token in a web api Controller it works. If I validate the token in a mvc controller…
Jafin
  • 4,153
  • 1
  • 40
  • 52