-2

I am in the process of upgrading an existing website to ASP.NET Core 2.1. The goal is simplification and ease of maintenance. Existing site is using:

  • EF and .NET 4.6.2
  • A [Users] table in SQL Server which is related to a lot of other tables in the project.

New site is using Dapper instead of EF, plain SQL statements directly in the MVC Controllers, and generally no more stored procs (inspiration from Nick Craver of SO). I have looked into ASP.NET Core Identity as it seems to have a lot pre-built functionality which help on the maintenance part - like "signup using Facebook, LinkedIn and other providers", "reset your password", "confirm account" and more.

My question is:

How would I go about implementing Identity on the new site and re-using the existing [Users]-table? It seems I need to add additional tables like [AspNetUsers], [AspNetRoles] etc by using Identity - which in turn conflicts with the existing model relying on the [Users]-table, or?

The [Users] table:

UserID
CustomerID
Email
Password
Active
Created
IsDeleted

Hoping for some advice, pointers, examples, articles etc. Google was not my friend unfortunately.

  • 1
    First, welcome! Normally 1 or 2 downvotes are just noise and can be ignored, but in this case the question seems a bit "headless". Stackexchange encourages single, definitely answerable questions. I'd advise you to turn your first question into an own question on here. Your second "question" is not a question. Your third question sounds like "bad subjective", but can be salvaged if you go more for "How do I" instead of "what is best". You'll actually have to decide what you want to go for there, too, because on the top it says – R. Schmitz Aug 27 '18 at 11:49
  • "The goal is simplification and ease of maintenance" and at the bottom you ask how to "increase the security". The "Several layers of (junk!)" also seems a bit like a tiny rant. Describing those layers in detail can help, in yet another question about refactoring such a project. – R. Schmitz Aug 27 '18 at 11:49
  • At the moment, this seems a bit like a briefing for a contractor who would take a lot of money to solve this. Those same experts also answer questions here for free, but then most of the work will be on the asker, making it as easy as possible to answer the question. Writing a good question can easily take an hour or two, so you'll have to evaluate if you want to ask all those things I mentioned. Sometimes it is more efficient to google for an hour etc. Now, I hope this huge amount of criticism doesn't scare you off, it certainly was all meant to be constructive! – R. Schmitz Aug 27 '18 at 11:55
  • 2
    @R.Schmitz - thanks for the all inputs / criticism (not scaring me off at all, it is only helpful). I will update the question to make it clearer. – Sha Aug 27 '18 at 13:55
  • Your Users table seems to be missing a Salt field! – Frayt Sep 5 '18 at 12:50
0

Since there are no other answers I'll add some of my own experience of 'upgrading' to .net core.

.net core uses the OWIN stack. It also uses different, but similarly named, packages to the .net framework OWIN stuff.

I spent some time struggling with it getting the security to work the way I wanted to and my view is that it's disjointed, and badly documented.

It seems fine if you just want to secure an api with a JWT. But to secure a website server side you have a dozen things all written by different people, with seemingly different ideas about how things should work. and you have to get them all to play together.

It's a big topic to get into and I found no 'plug and play' solutions for my setup.

  • HI Ewan, thanks for your inputs - I am getting the exact same experience when searching around / finding articles. I won't make this as an answer as I am hoping to have more inputs. – Sha Sep 2 '18 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.