Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Building Modern Web Apps: (03) ASP.NET Identity

Download

Right click “Save as…”

Explore the new ASP.NET Identity system. Learn how to migrate your existing membership data to the new Identity system and how to integrate with other membership systems.

Full course outline:

Follow the Discussion

  • Luiz BicalhoLuiz Bicalho

    I saw in Stuart Leeks blog that the azure tables asp.net identity implementation isn't for production, does Microsoft have plans to create an azure tables implementation to be used in production?

  • BrunoLMBrunoLM

    What if I don't want code-first? And if I already have a database with a different User table?

  • This was an excellent session, however I would really had liked if you would have shown an example of how to give the users the ability to create a user profile at the site using a form. 

  • The leeks should have been discussed first, but thank you for the detailed help. Good series. Do you have the code solution for this as following along 2013 and .NET 4.5.1 does not yield same results.

  • @Luiz, there are quite a few azure table storage implementations for Identity which you can use to build upon. Since Storing data in Azure Table Storage is domain specific, you would need to customize the provider to suite your application.

  • @BrunoLM you can plugin your own UserTable into ASP.NET Identity. If you do not want to use Entity Framework Code First then you would have to write your own Custom provider which can work with the User Table in the database.

  • @Abdella you can build up the form yourself to customize the profile data you want for the user. The following article shows how you can add more profile data and build up a form as well http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on

  • @pcpgmr: what code solution are you looking for?

     

  • EricEric

    Scott, at the beginning of the video you mention a talk on Friday.azure.com with Vittorio B that would be coming. I can't seem to find it. Is it up yet? If so, can you post a link?

    Thanks.

  • This looks great, but near the beginning of this video, you mention that we can add other social media logins, but I have been unable to find any documentation as to how to do this.  if I want to use my own MVC5 website, call it site IdentityProviderSite, as an identity provider, so that users can log in to another of my MVC5 sites, call it Site A, what code do I need to write first of all in Identity ProviderSite, and secondly in Site A (so that users can log in to site A via IdentityProviderSite)?

    Many thanks

  • Also, the code you give to access custom properties that have been added to the user's profile no longer works in websites created (e.g. MVC5) under Visual Studio 2013 Update 2 CTP:

    var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()));

    gives a compile error saying that ApplicationUser in new UserManager<ApplicationUser>: "this argument type is not within its bounds".  (This seems to be a change introduced in the move from version 2 to version 2.0.2 of Microsoft.Owin.Security?). 

    How can we access the custom properties in the Update 2 CTP template projects?

    Also, even before Update 2, why create a new UserManager, rather than the UserManager which is a member of the AccountController class?

    Thanks

  • OK, I think I've found a solution, although Visual Studio 2013 Update 2 CTP implies visually that there is a compile problem (it gives a red squiggly line, saying Unknown method FindById(string)) , even though the code actually runs:

    var currentUser = UserManager.FindById(User.Identity.GetUserId());

    This uses the AccountController's UserManager property. 

  • Hi,

    How do I remove all ASP.Net Identity from Web Project, e put all thoses classes in a Class Library Project. Do you have any tutorial for this?

  • orhanorhanveli orhanveli

    @BrunoLM: you can make your own like this.

    implementation: http://www.asp.net/identity/overview/extensibility/implementing-a-custom-mysql-aspnet-identity-storage-provider

    I made a NHibernate implementation for testing and it works just fine

  • DevMecDevMec

    Hi,

    Very good article, but I have questions:

    1- Can you explain more about claims in asp.net.Idendity ?

    2- What is the best way to implement the user interface for CRUD the Color and FisrtName of a user ?

    Best Regards,

  • FadiFadi

    Hi,

    how can we list the user name in a view ??
    how can we link the AspNetUser table with other table we create in our database so we can use the user name and there roles

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.