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.
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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.