ASP.Net Identity with old Membership-tables - asp.net-membership

I'm using Forms Based AUthentication with SharePoint.
It uses the following tables :
Now I'm using the ASP.Net identity framework and this uses the following tables :
How can I make the ASP.Net identity work with the "SharePoint"-tables?

Related

MVC Net Core Identity users not using EF not SQL

I want to create a Site using MVC .net core 3.0 and I'd like to use Identity but I need the users to be save not in SQL but in a service we already have for administering users, and I can query using a Rest Service.
What I need is when an user logins, instead of reading from EF and SQL I need to go to this other Service and check there if the user and password are correct.
I want to keep protecting the rest of the pages using the [Authorize] attribute once an user logs in.
Is there a way to change this behavior in .net core Identity?,
Thanks for any comments!

..NET CORE 2.1 Razor Windows Authentication Profile and Authorization Stored in SQL

I'm building a Core 2.1 intranet app with Razor pages that uses Windows Authentication. The users have profiles stored in a Sql database and are linked with the UserPrincipal Guid.
I planned on populating the HttpContext.Session with a few fields that are retrieved with the Sql query. Where would I do this?

ASP .Net Core 2.1 API Template with role based authorization

I wanted to create an ASP .Net Core 2.1 REST server. For that I created a new project and choosed the "API" Template. I got it working with Entity Framework, a simple SQlite database and some GET and POST calls.
Now I'd like to add authorization (role based) to the API. I read about the Identity stuff but I just don't get it working. Is there any good tutorial or can somebody tell me how I can add authorization to my REST server? My database context already has a table "User" for the user information... thanks in advance!
If not already seen (https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-2.1&tabs=visual-studio) is well worth a look.I'm not aware of tutorials involving SQLite and Identity though have used embedded databases without problems in other Net Core apps. The Visual Studio 2017 Net Core Template using "Individual User Accounts" option adds authentication/authorization out of the box for SQL Server (Express) database with a set of login/logout razor pages. The Identity tables are quite specific and generally populated by migrations. You may find it useful to scaffold the Identity razor pages by right-clicking the project "Add => New Scafolded Item => Identity" The ApplicationModel.cs model class is used to customise the AspNetUsers table. These can all be reverse engineered using "EF Core Power Tools" (https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools) and recreated in another database using a custom context (eg WCX_IdentityContext.cs) by selecting "Reverse Engineer" from right-click menu. Typically you can access via the context as shown below
[Authorize]
public IActionResult Index()
{
// The home page is redirected dependent on currently logged in user details stored in the Identity tables.
if (User.Identity.IsAuthenticated)
{
using (var context = new WCX_IdentityContext())
{
// Use Identity and EF core to retrieve logged on user details
var identity = (ClaimsIdentity)User.Identity;
// The AspNetUsers Identity table contains the basic identity details
var user = context.AspNetUsers.SingleOrDefault(x => x.UserName == identity.Name);
I hope this helps you getting started.

ASP.NET Core Identity with IdentityServer and Xamarin Native

I am trying to login from a Xamarin Android App and Xamarin iOS app to an ASP.NET Core Web App using Identity and it isn't working. Has anyone tried Xamarin with IdentityServer4 and the standard ASP.NET core identity out of the box? E.g. Use aspnetusers table created by identity and all the user registration features while identityserver provides token stores for mobile app?

Live ID with MVC with out ASP.NET Membership

Does anyone know is there a way to implement Windows Live ID authentication into your ASP.NET MVC site. I am moving a project from Web Forms to a MVC solution and do not want to rebuild the database so ASP.NET Membership mentioned in windows-live-id-in-asp-net-mvc is not a valid solution.
And just to avoide this question the customer not want to use Open ID.
I don't fully understand your question, but here's an example of a MVC.NET app which uses LiveID but doesn't use an ASP.NET Membership provider:
http://blog.smarx.com/posts/actually-i-m-a-cia-agent

Resources