Home > Software engineering >  Asp Net Identity shared between multiple applications
Asp Net Identity shared between multiple applications

Time:04-15

I currently have two asp.net websites I'm building and am trying to get Asp Net Identity (using EntityFramework). I've been able to get successful login functionality on one site, but cannot get it to work with the second site.

Both sites are on the same web server and share the same database. I need to be able to create / manage users on one of the sites, and have them be able to access the other site.

I'm very new to this technology, but I'm guessing the way a user is authenticated relies partly on the application being the same, but am unable to find much info on how to resolve this issue.

All help is greatly appreciated!

CodePudding user response:

Your problem is not with sharing Identity between the apps. Your problem is that there is something you are not doing correctly in the second app that cannot manage the ID. The reason I said so is that you claimed the two apps are on the same web server and same database. So, there shouldn't be a problem peculiar to only one app when the other one is working provided you are using the same set of tools.

If your tools or languages of development are different, then that may be the cause otherwise, debug your second application to ensure it is connecting to the right database.

Another thing you can look at is that, if the two applications are running simultaneously and you start a transaction on the first application on the table storing the ID, without closing or ending the transaction, the table will be locked and the second application will not be able to access the table until the transaction lock is released. Hope that helps you.

CodePudding user response:

I was missing some config settings. I was able to get it working using the following tutorial:

https://www.dotnet4techies.com/2017/12/how-to-share-authentication-between-multiple-applications-in-aspnet.html

  • Related