Questions tagged [asp.net-identity]
The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems. Use the ASP.NET Core Identity tag for questions about Identity in ASP.NET Core.
asp.net-identity
9,039 questions
0
votes
2
answers
1k
views
How are the new membership tables created in ASP MVC5
I have created a number of examples but can't find how the new tables are created. I am familiar with the code first approach and with the way they are automatically created with MVC4.
Can anyone ...
2
votes
1
answer
778
views
ASP.NET identity async vs sync issues
Why there is async and sync versions of UserManagerExtensions (like CreateLocalUser and CreateLocalUserAsync) but only async methods on RoleManagerExtensions? How I suppose to add user to a role from ...
3
votes
1
answer
9k
views
Store and retrieve the token received for the user after authorizing with facebook or twitter
Hi I'm currently trying to write an MVC5 application that will have the ability to store the token received for the user after authorizing with facebook or twitter.
I'd like to store this in the ...
2
votes
1
answer
3k
views
Web Api Asp.Net Identity
I'm just trying to authentication a user with Asp.Identity in DelegatingHandler.
Like this code above:
...
7
votes
1
answer
3k
views
How to setup custom schema for the new Microsoft.Asp.NET Identity (MVC5)
I have been struggling with the new Forms Identity process Microsoft introduced with the One Asp.Net implementation -- in particular with regards to Asp.NET MVC5.
My issues are twofold:
How to ...
31
votes
6
answers
35k
views
How to access Facebook private information by using ASP.NET Identity (OWIN)?
I am developing a web site in ASP.NET MVC 5 (using RC1 version currently). The site will use Facebook for user authentication and for retrieving initial profile data.
For the authentication system I ...
0
votes
1
answer
1k
views
override Asp.net Identity MVC5
I dont know asp.net identity work with EF, but I can override to I use Nhibernate.
currently I use custom roles by using filter in my project, I do not need to use anotations roles = "admin", because ...
1
vote
3
answers
3k
views
RoleManager and SimpleMembershipProvider cannot be used with AuthorizeAttribute
I have an Asp.Net MVC 5 application. I want to use user roles to authorize only some people to use a specific action. I've changed my Web.config file like this:
<...
7
votes
2
answers
10k
views
Where is Microsoft.AspNet.Identity.Owin.AuthenticationManager in Asp.Net Identity RTM version?
I have installed the nightly build of the AspNet-identity assemblies from here
It seems that the AuthenticationManager class from the RC version is gone from the ...
2
votes
1
answer
2k
views
How can I get early access to upcoming Asp.Net Identity changes?
Since there are a lot of changes between each version of Asp.Net Identity, is there a way to get early access to any upcoming changes going forward?
45
votes
6
answers
89k
views
How to obtain a list of Users from ASP.NET Identity?
Edit: This question is outdated
The Identity Framework was a moving target at the moment I asked this. The authors changed quite a few things and they have decoupled several others, making everything ...
11
votes
3
answers
9k
views
Decoupling Microsoft.AspNet.Identity.*
I am working in Visual Studio 2013 RC and am testing Forms Authentication using new Microsoft.AspNet.Identity.* packages.
I would to integrate these concepts (...
3
votes
3
answers
9k
views
Get Current User ASP.NET Visual Studio 2013 Preview ClaimsPrinciple
I'm trying to get the current user in a web forms project using the new Visual Studio 2013 Preview for Web. I'm able to get the username using Page.User, but trying to get the user id is where I'm ...
0
votes
1
answer
1k
views
MVC5 - Most Efficient Way to Access the User Object
While learning C# and MVC, I'm using the stock MVC template in VS2013 Preview, I'm trying to get a reference to the User class (what the templates creates in the IdentityModel.cs file) of both the ...
19
votes
3
answers
21k
views
Get all role names in ASP.NET MVC5 Identity system
MVC5 uses a new Identity System. How can I get all role names?
I try do access it via IdentityStore but without success.
0
votes
2
answers
766
views
Register users synchronously during context seed
In my ASP.Net MVC 5 project, I have a custom initializer class:
class CustomInitializer : DropCreateDatabaseIfModelChanges<GhazanetContext>
I want to seed ...
1
vote
1
answer
963
views
ASP.NET Membership / Identity MVC 5
I am aware that MVC 5 uses Microsoft.AspNet.Identity, however I am still very confused working around it and I cant seem to figure how to do the equivalent of:
...
3
votes
3
answers
1k
views
Where I can find documentation for ASP.NET Identity RC1?
After Microsoft updated ASP.NET Identity framework to version 1.0.0-rc1, I can't find any documentation or guide how to use it. There is 2 sample projects on github (one, two), but they not covering ...
163
votes
9
answers
227k
views
How to get current user, and how to use User class in MVC5?
How can I get the id of the currently logged in user in MVC 5? I tried the StackOverflow suggestions, but they seem to be not for MVC 5.
Also, what is the MVC 5 best practice of assigning stuff to ...
0
votes
2
answers
362
views
How do I store the currently logged in user in my table?
Please have patience I am new at MVC. I have created a model called "Book" which represents a text book, in my IdentityModel I added this:
...
11
votes
1
answer
2k
views
IdentityStoreManager could not be found after upgrading Microsoft.AspNet.Identity to rc1
After Upgrading Microsoft.AspNet.Identity.Core to 1.0.0-rc1 several errors appear in the AccountController.cs And AppModel.cs classes which are generated by the default MVC5 templates in Visual Studio ...
5
votes
3
answers
2k
views
Updating asp.net MVC from 5.0.0-beta2 to 5.0.0-rc1
Last night, I decided to try and implement SignalR to my application, and because I use MVC 5, I had to use the 2.0 beta of SignalR.
And oh boy, what a timing. Last night, Microsoft also decided to ...
4
votes
3
answers
5k
views
Could not load type 'System.Data.Entity.DbSetExtensions' from assembly 'EntityFramework
Updated from entityframework 6.0.0-beta1 to 6.0.0-rc1 and when logging into my MVC5 application i get the following error
...
2
votes
0
answers
461
views
Using complex user type linked to existing table in the new ASP.NET Identity
I'm trying to implement new ASP.NET Identity in my old project. I have an existing table called tda_Contacts in the database. The following code works fine without table attribute and creates all new ...
23
votes
7
answers
52k
views
ASP.Net Identity how to set target DB?
I am using the ASP.NET Identity Sample from the Asp-Team, and i am trying to change the database for the IdentityDbContext...
I tried it with the constructor
<...
1
vote
0
answers
198
views
Database model for users with multiple capabilities
In another question, I explain my goal to create 2 different types of users with different capabilities in my ASP.Net MVC 5 website. I wonder how I would be able to modify my current database models ...
13
votes
1
answer
25k
views
What is Membership Provider on MVC 5?
Asp.Net MVC 4 Internet Application uses SimpleMembership. When you create a new MVC project on Visual Studio 2013 Preview, I think MVC 5 uses the new one. Do you know anything about it??
...
40
votes
14
answers
68k
views
No owin.Environment item was found in the context
Microsoft recently introduced new ASP.NET Identity - replacement for old (Simple)Membership. Unfortunately, I can't use this new membership system in my old project because it throws System....
2
votes
2
answers
1k
views
MVC user store's IUserStore.Create fails if User has complex type
I'm using ASP.Net MVC 5 from Visual Studio. I want to create a user profile with complex types. I have modified the code of the User class in ...
0
votes
1
answer
537
views
mvc5 IdentityAuthenticationManager reset database
How would I go about resetting the database that backs a Microsoft.AspNet.Identity.EntityFramework.IdentityAuthenticationManager.
I went to go add ...
30
votes
7
answers
20k
views
Get ExtraData from MVC5 framework OAuth/OWin identity provider with external auth provider
I'm trying to use the new MVC5 framework in VS 2013 preview.
The membership authentication framework has been overhauled and replaced with OWin.
In particular, I ...
22
votes
3
answers
16k
views
Custom Membership with Microsoft.AspNet.Identity - CreateLocalUser fails
I've been trying to implement a custom version of the new Identity features in ASP.NET 4.5 (Microsoft.AspNet.Identity), using Visual Studio 2013. After many hours of playing around with this, I've ...
0
votes
1
answer
433
views
visual studio 2013 mvc 5 configuration initial user secret
I am new for 2013 MVC 5. I am trying to initial an user in seed of the configuration. However I don't not how to encrypt the secret in the
context.Secrets.AddOrUpdate( i => i.UserName, new ...
5
votes
1
answer
2k
views
Visual Studio 2013 MVC template raises errors when used with Unity
I have created a new MVC5 application in Visual Studio 2013 (preview) with the latest ASP.NET and Web Tools 2013 Preview Refresh (1.0.0-beta1). I noticed that the IdentityConfig.cs is gone, together ...
10
votes
1
answer
9k
views
How to use new MVC5 Authentication with existing database
I've looked through the current literature but I'm struggling to workout exactly how to make the new IdentityStore system work with your own database.
My database'...
19
votes
4
answers
3k
views
ASP.NET Identity
I'm currently building a new ASP.NET MVC 5 project which I want to release around September. I need to choose a membership system, but I'm currently quite confused about which direction should I take. ...
2
votes
1
answer
9k
views
Compiler Errors after updating Microsoft.Aspnet.Identity in MVC5
Using the Vs2013 preview, i created a c# webapp selecting MVC and WebAPI from the dialog. It compiled ok. If i update the references from the nuget package manager to the beta2 versions (include ...
5
votes
3
answers
2k
views
How do I configure the Users context/table?
With the new ASP.NET MVC 5 Preview released, how do I configure the Users context/table?
In MVC 4 I would just use my own User class and then point the WebSecurity initialize to it, tike this:
...
12
votes
4
answers
15k
views
Is there any way I can mock a Claims Principal in my ASP.NET MVC web application?
I've got some ASP.NET MVC controller code that checks if a user is authenticated and if so, it checks to see if it has a specific claim. Works fine.
I've got some ...