Topics
Published on December 5, 2016 by kudvenkat
Want create site? Find Free WordPress Themes and plugins.

Text version of the video
csharp-video-tutorials.blogspot.com/2016/12/using-aspnet-identity-with-web-api.html

Slides
csharp-video-tutorials.blogspot.com/2016/12/using-aspnet-identity-with-web-api_5.html

All ASP .NET Web API Text Articles and Slides
csharp-video-tutorials.blogspot.com/2016/09/aspnet-web-api-tutorial-for-beginners.html

All ASP .NET Web API Videos

All Dot Net and SQL Server Tutorials in English
www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd

All Dot Net and SQL Server Tutorials in Arabic
www.youtube.com/c/KudvenkatArabic/playlists

In this video we will discuss customizing and using asp.net identity server with Web API.

In our previous video we have seen that the database that the identity system creates has a strange name.
aspnet-EmployeeService-20161122014700.mdf

Identity database tables and their purpose
__MigrationHistory – This table tells us that it is using entity framework
AspNetRoles – Stores roles information. We do not have any roles yet so this table is empty
AspNetUserClaims – We do not have claims either so this table will also be empty
AspNetUserLogins – This table is for third party authentication providers like Twitter, Facebook. Microsoft etc. Information about those logins will be stored in this table
AspNetUserRoles – This is a mapping table which tells us which users are in which roles
AspNetUsers – This table stores the registered users of our application

At this point the obviuos question that comes to our mind is, is it possible to change the database name. If so, how can we do it?

The DefaultConnection string in web.config controls the name of the generated database. To change the name of the generated database change the DefaultConnection string in web.config.

Can we create asp.net identity database in SQL Server
Yes we can. To create the database in SQL Server, change the DefaultConnection string in web.config to point to your SQL Server.

Is it mandatory for the Identity tables to be in a separate database. Can’t we have them created in an exisiting database.
No it is not mandatory for the Identity tables to be in a separate database. You can have them created by Identity framework in an existing database by just making your connection string point to your existing database instead of a separate database.

ASP.NET Identity system can be used with all of the ASP.NET frameworks, such as ASP.NET MVC, Web Forms, Web API, and SignalR. It can be used when you are building web, phone, store, or hybrid applications.

In our next video we will discuss implementing the Login page.

Did you find apk for android? You can find new Free Android Games and apps.

Leave a Reply

18 Comments on "Using asp net identity with Web API"

Notify of
avatar

Ja va
Guest
Ja va
8 months 18 days ago

this doesnt help, what if we want userID?

Bouba Sylla
Guest
Bouba Sylla
9 months 10 days ago

How do I find the password if it is lost ?

Karthik Rangappa
Guest
Karthik Rangappa
9 months 13 days ago

Hi Venkat, It will be great if you could please explain to me how to use existing Users Table in Oracle DB with Identity Entity Framework DataBase Fist Approach.

Avi Yitbarach
Guest
Avi Yitbarach
9 months 23 days ago

Thank You!!!!!

Пчиња
Guest
Пчиња
10 months 3 days ago

Please Sir, could you provide video with custom user table authorization in web api? How could be implemented authorization with legacy user table and web api, not with MS identity tables? I tried to extend default identity tables to use my custom legacy table, but I couldn't do that. Or, please, could you provide some good resources on internet relates to my question. Thanks in advanced

Cristhian Valencia
Guest
Cristhian Valencia
10 months 10 days ago

Thank you

Pronoy Gomes
Guest
Pronoy Gomes
10 months 14 days ago

Excellent ASP.Net Web API Tutorials. Highly recommended to those want to learn ASP.Net Web API. Thank you very much. Thoroughly enjoyed your tutorials so far.

Mahroz Abbas
Guest
Mahroz Abbas
10 months 17 days ago

sir please tel me who to view user own profile page after login in asp.net user enter email id and password view own profile

Muhammad Mouzam
Guest
Muhammad Mouzam
10 months 20 days ago

Thank you so much 🙂

achu r
Guest
achu r
11 months 20 days ago

Thank you Sir !!!

wpDiscuz