Adding and Referencing Additional Data in the Asp.net Identity AspNetUsers Table

I have talked about Identity and how useful it is. There are somethings that I wish were included that are not however. This is when the ability to extend or modify Identity comes in useful. Storing a user’s name or other personal information in the AspNetUsers table is one of those things. In this post I am going to show how to add a FirstName and LastName column to the AspNetUsers table and then pull that information out when a user signs in.

Continue reading

Creating a YouTube application with ASP.NET MVC and the YouTube API

YouTube has become the main video hosting site on the internet. Not only can individuals and companies post videos but they can find numerous videos posted by other users. These videos may be very useful in helping to teach kids, employees or others specials lessons or skills. The problem is making it easy for users to view these videos without all of the other suggested videos and garbage on the YouTube site itself. Creating an application to manage the videos that you want users to see without all the other stuff is pretty straight forward.

Continue reading

GitHub: Custom Identity Management

I have blogged previously about Identity and will continue to do so because I think it is a powerful and easy to use package for user and role management. The one thing that it is missing from the base install is a web based method for an administrator to manage those users and roles. There is a nuget package that I have used and talked about before called the IdentitySample. This package very easy to install; however, the problem is that it changes the namespace of over 30 different files. It will also completely wipe out any code on the shared layout as well as the home index file unless you step through and approve or disallow identity to change every file individually.

Continue reading

Working with Identity Users and Roles – Accessing Roles After User Login

There is an issue in the Identity framework when the business requirements need a developer to interact with the roles that a user is assigned to as soon as the user object is created upon successful login. The Identity framework has a bug that has been posted online numerous times but is hard to identify through all of the other code that users post. Luckily there is a very easy fix for it.

Continue reading

Extending Identity – Adding Roles at User Registration

Depending on the application there may be times that it is desirable or required to add a user to a role immediately when they register. Other times you may want to add users to various roles depending on what privileges you want them to have. This is very easily accomplished in the Register method of the AccountController. This is the third post in a 3 part series on extending the ASP.NET Identity Framework.

Continue reading

Extending Identity – Account Verification

As stated in the previous blog post Identity is very useful for Asp.net developers out of the box. There is some functionality that must be configured to make it completely functional. User can register and they will be redirected to a default page that asks them to check and confirm their email. The system is not setup however to email the confirmation message nor is it configured to lock users out until they confirm their email. This takes a little configuration but I take it a step further to make it as user friendly as possible. This is the second post in a 3 part series on extending the ASP.NET Identity Framework.

Continue reading