Reputation: 5524
I have one ASP.NET application "A" that has forms authentication and has exposed WebAPI. Now I need to create another ASP.NET Core application "B" which would internally call application "A" by creating a cookie by itself (for some specific hardcoded user) and call WebAPI methods of application "A" properly, as if user logged in.
Upvotes: 0
Views: 1045
Reputation: 1114
Sharing forms authentication between an ASP.NET and ASP.NET Core is possible if the two sites are on the same domain or sub-domain. Scott Hanselman has a post on this at https://www.hanselman.com/blog/SharingAuthorizationCookiesBetweenASPNET4xAndASPNETCore10.aspx. Here are the basic steps:
Upvotes: 1