C# 如何使用托管在.Net framework 4.6应用程序中的登录页对.Net Core 3.1上的IdentityServer 4应用程序进行身份验证?
我们在.NETFramework4.6应用程序上有一个当前登录页面。 我们正在构建一个新的.Net Core 3.1 IdentityServer 4应用程序,主要用于颁发令牌,但在代码身份验证过程中,我们希望重定向到当前.Net framework 4.6应用程序中托管的登录页面 从IDServer应用重定向到.Net framework 4.6应用的登录页面工作正常,但在.Net framework 4.6应用创建并设置cookie后,IdentityServer 4似乎没有响应此cookie 有人知道如何在.Net framework 4.6应用程序中实现登录,然后重定向回IdentityServer并在登录后处理令牌吗 在IdentityServer中,以下代码可以重定向到.Net framework 4.6应用程序:C# 如何使用托管在.Net framework 4.6应用程序中的登录页对.Net Core 3.1上的IdentityServer 4应用程序进行身份验证?,c#,asp.net,cookies,identityserver4,asp.net-core-3.1,C#,Asp.net,Cookies,Identityserver4,Asp.net Core 3.1,我们在.NETFramework4.6应用程序上有一个当前登录页面。 我们正在构建一个新的.Net Core 3.1 IdentityServer 4应用程序,主要用于颁发令牌,但在代码身份验证过程中,我们希望重定向到当前.Net framework 4.6应用程序中托管的登录页面 从IDServer应用重定向到.Net framework 4.6应用的登录页面工作正常,但在.Net framework 4.6应用创建并设置cookie后,IdentityServer 4似乎没有响应此cooki
services.AddIdentityServer(选项=>
{
options.UserInteraction.LoginUrl=”https://localhost:44352/login/";
options.UserInteraction.LoginReturnUrlParameter=“returnUrl”;
})
但在应用程序运行之后“https://localhost:44352/login/设置标识cookie并使用提供的返回URL重定向回identity Server 4,identity Server 4未读取该cookie。
我们甚至尝试使用另一个使用Microsoft的Identity package的.Net Core 3.1应用程序创建Identity cookie,该程序在Identity Server 4中运行,但在另一个应用程序中创建此cookie并将其传递给Identity Server 4时不起作用。我没有尝试过,但您可以执行以下操作(一般情况下)
我没有试过,但你可以做以下事情(一般情况下)