首页 > 解决方案 > 如何在带有 Servicestack 的 .NET Core 中使用 Windows 身份验证登录

问题描述

在以前使用 ServiceStack 的应用程序中,我和我的团队一直在使用 .NET Framework 和包含的 AspNetWindowsAuthProvider。

切换到 .NET Core 后,我们发现包含的提供程序不再位于 ServiceStack.Core 中。

如何在 ServiceStack.Core 应用程序中使用 Windows 身份验证?

标签: asp.net-coreservicestackwindows-authentication

解决方案


ServiceStack doesn't have a built-in Windows Auth Provider for .NET Core, a potential solution is to use ASP.NET Core's Identity Auth with ServiceStack, a pre-configured solution is available from the mvcidentity .NET Core Project Template.

Then Configure Windows Authentication in the ASP.NET Core App which is used by the NetCoreIdentityAuthProvider to create an Authenticated ServiceStack Session from the Authenticated ASP.NET Core Identity.


推荐阅读