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

Don't Show Validation Summary Message First Time MVC

I am using MVC Identity For login and MVC Validation For Required Fields, I don't want to show error messages first time. It should be shown only when user click submit button. But as page is getting post to ActionResult every time, So it is showing…
Amna
  • 603
  • 7
  • 30
4
votes
2 answers

Identity 2.1 - Remove from all previous roles, then add to specific role? Plus error in calling UserManager when doing so

I am writing a user manager for a system administrator where you can perform various functions on the user object. My current dilemma is I want to be able to write something like await UserManager.RemoveFromRoleAsync(userID, any); and have that…
Dreamcasting
  • 454
  • 2
  • 5
  • 21
4
votes
1 answer

why is the Configuration method of Owin Startup class is invoked before and after the page load?

The Configuration method of OWIN startup class is called twice in asp.net identity application. The method is called twice i.e. before and after page load on server side. I already found one question(Why is the Configuration method of the SignalR…
Shahbaz Khan
  • 133
  • 1
  • 10
4
votes
2 answers

Connect to an Existing MVC 5 DB (Identity model) From External Project

Background: I've a Web App that offers a service to my customers. Motivation: Now I want to expose that service with the help of an API (WCF & Web API). The consumers of the service will need to authenticate. The Problem: Most of the consumers of…
Ron
  • 1,744
  • 6
  • 27
  • 53
4
votes
2 answers

Asp.net 2.0 Identity, ConfirmEmailAsync() getting Invalid Token

I trying to confirm user's email using Asp.net Identity 2.0. As suggested by few blogs I've put machineKey in Web.Config file, so that Encryption and Decryption works on Azure website. Locally I'm unable to generate token. While trying to confirm…
arif.khan.b
  • 311
  • 3
  • 8
4
votes
1 answer

AspNet Identity Authentication hashing machine specific

I am about to deploy my C# MVC AspNet Identity website to production, and I am concerned that the password hash in the db may be specific to the machine that it is created on (like it depends on the machine key).. Please note that this is a "out…
user230910
  • 2,353
  • 2
  • 28
  • 50
4
votes
1 answer

Single ASP.NET Identity for multiple projects

Is there any way to use the ASP.NET Identity mechanism over two different projects?? ie. I want to use a single authentication mechanism for a MVC project and a WebAPI project. Is it possible?
ARUN RAJ
  • 49
  • 2
4
votes
0 answers

Implementing Simultaneous OAuth Grant Types

Currently trying to figure out a solution for ASP Identity v3's lack of multiple identity support. The reason why I need to find this solution is because we have a "Partner" website that is supposed to authenticate with a custom API. After that…
terbubbs
  • 1,512
  • 2
  • 25
  • 48
4
votes
0 answers

What is the difference between UserManager created using HttpContext vs DBContext

What is the difference between these two methods to create UserManager? var userManager1 = HttpContext.GetOwinContext().GetUserManager(); var userManager2 = new UserManager(new…
SMUsamaShah
  • 7,677
  • 22
  • 88
  • 131
4
votes
1 answer

What is the purpose of ASP.NET's machine key validation key

In ASP.NET 4, the default hashing algorithm was changed to HMACSHA256. I know the decryption key is used in forms authentication and for the new ASP.NET Identity cookie authentication. Is the validation key used for anything other than Viewstate…
Ben Foster
  • 34,340
  • 40
  • 176
  • 285
4
votes
1 answer

ASP.NET MVC Identity and Active Directory

I am looking to integrate ASP.NET Identity and Active Directory Identity in a single MVC Solution. This solution will be deployed in 2 different server. When the internal users access the URL it should validate against LDAP and redirect…
4
votes
2 answers

Is there a fundamental difference between claims authorization and roles authorization?

VS2013, MVC5 I may get some terminology wrong because I'm new to this topic. What I've read has led me to conclude that claims can be used for authentication and authorization which are 2 very different concepts. Assuming this thinking is correct,…
Alan
  • 1,587
  • 3
  • 23
  • 43
4
votes
1 answer

Change role permissions in ASP .NET MVC

I am working on ASP .NET MVC 5 web application. I am using [Authorize(Roles="administrator")] public class MyController:Controller{} Is there a way to dynamically add new authorized roles for the controller? For example retrieve this information…
4
votes
1 answer

What's the difference between context.Get() and its generic version?

I'm trying to get familiar with OWIN and there are a lot of things that confuse me. For example, in partial startup.cs class I register context callback…
Toddams
  • 1,489
  • 15
  • 23
4
votes
1 answer

How to mock ApplicationUserManager from AccountController in MVC5

I am trying to write Unit Test for Register Method at AccountController I am using moq and what is the correct way to mock ApplicationUserManager, ApplicationRoleManager and ApplicationSignInManager from Unit Test. public…
Si Thu
  • 1,185
  • 1
  • 13
  • 21