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
1 answer

Validating user rights when invoking controller method in ASP.NET MVC

I'm working on a project where users can log in and create as many number of "work projects" as they like, which are tied to their account Id. We're using OWIN and ASP.NET Identity 2.1. All the MVC controller actions that respond to HTTP POST…
xingyu
  • 312
  • 1
  • 3
  • 13
0
votes
1 answer

UserManager.AddPassword doesn't work as expected

I am using ASP.NET Identity for membership in MVC5 and have a page for the admin user to manage users and roles. I am trying to allow the admin to change the password for any other user if he needs to do so. I am using this code to perform the…
Matt
  • 6,787
  • 11
  • 65
  • 112
0
votes
2 answers

List User and Role in asp.net identity 2.0

How do i display a list of Users and their Roles in ASP.NET Identity 2.0. Example... John Doe - Admin Bob Smith - User So far I have created a UserRoleViewModel public string fname { get; set; } public string rname { get; set; } In the controller,…
Amit Philips
  • 387
  • 6
  • 17
0
votes
1 answer

ASP.NET Identity 2 - UserManager.ConfirmEmail Fails In Production

I've set up OWIN in an ASP.NET MVC app (including email confirmation). When an account is created I get an email containing a link to confirm my email. When I visit the link, I get the "Invalid Token" error. If I take that exact same link and…
0
votes
1 answer

AngularJS + ASP.NET Access Control Authentication

I am working on a project needs AngularJS on the client side and ASP.NET Web Api on the server side, seems I am fairly new to Angualrjs, I couldn't find a good way to handle access control in AngularJS. AngularJS routing seems to only "work" within…
0
votes
1 answer

Different field for logging in normal users and admins

I'm trying to implement ASP.Net Identity into existing ASP.Net MVC and Web API applications. However, normal users should be registered using email adresses and administrators should be registered using usernames. How can I have it this way?
juliano.net
  • 7,982
  • 13
  • 70
  • 164
0
votes
1 answer

MVC 5 Web API Login without Bearer Token

Long story short. I have a login form in the header on every single page, when I log in successfully it works fine but when the user is incorrect for example it redirects to the default login page (a view that was originally created with MVC…
0
votes
1 answer

Cast User object in ASP.NET Identity 2.0

I want to get a custom ApplicationUser instance in the controller. Can I get it from User object inside the controller? How should I do that? I tried this but it didn't worked: ApplicationUser u = (ApplicationUser)User; ApplicationUser u2 =…
amp
  • 11,754
  • 18
  • 77
  • 133
0
votes
0 answers

Can the ID in the ASpNetUsers table change for any reason

I'm testing the new asp.net identity. I added a new table to the SQL database to gather more information about each subscriber (name, family name, city etc). I don't want to use the existing ASpNetUsers for that matter. I want to use 2 different…
Gloria
  • 1,305
  • 5
  • 22
  • 57
0
votes
1 answer

"access_denied" when using Yahoo OAuth

I have an ASP.NET MVC 5 application which was migrated to ASP.NET Identity and I am in the progress of implementing OAuth authentification. Before the migration I was using Yahoo with OpenID which did work, but is no longer supported. All common…
Christoph Fink
  • 22,727
  • 9
  • 68
  • 113
0
votes
1 answer

Remove User from Roles in ASP.NET Identity 2.0.1

I customized some functionalities of Identity system to fit my needs. I have the following ApplicationUserManager: public class ApplicationUserManager : UserManager { public ApplicationUserManager() : base(new…
amp
  • 11,754
  • 18
  • 77
  • 133
0
votes
2 answers

Strange thing when seeding users and roles in ASP.NET Identity 2.0.1

I found this piece does not work properly: protected override void Seed(PintxoLista.Models.ApplicationDbContext context) { var store = new RoleStore(context); var manager = new RoleManager(store); if…
Julen
  • 1,574
  • 3
  • 22
  • 38
0
votes
1 answer

Using ASP.NET Identity with an Oracle database and thus Entity Framework 5

Is there any chance to use ASP.NET Identity with Entity Framework while connecting to an Oracle database? The challenge seems to be some version conflicts: The Oracle Data Provider for .NET only targets Entity Framework 5 but not Entity Framework…
0
votes
0 answers

ASP.NET Identity 2.0 context adds "1" to table name.

I don't have any idea why it happens. I have DbContext which inherits from IdentityDbContext: public class TestContext : IdentityDbContext { public TestContext() : base("name=DomainModelContainer") …
Neir0
  • 12,849
  • 28
  • 83
  • 139
0
votes
0 answers

Prevent External Login redirect writing cookies using ASP.NET Identity 2

Apart from finding the newish ASP.NET Identity 2 system bulky and confusing. I'm just trying to do something simple, provide the oAuth credentials, and login with facebook. After getting this working, the response writes a massive 'state' string and…
simbolo
  • 7,279
  • 6
  • 56
  • 96