gpt4 book ai didi

.net - 托管在 Windows 服务中的 Kestrel 的 Windows 身份验证

转载 作者:行者123 更新时间:2023-12-04 16:57:35 25 4
gpt4 key购买 nike

我正在运行托管在 Windows 服务中的 ASP.NET Core 应用程序,如下所述:

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-2.1

我需要这个应用程序来支持 Windows 身份验证。我有哪些选择?我尝试使用 IIS 中的应用程序请求路由/URL 重写模块作为具有 Windows 身份验证的反向代理,但无法弄清楚如何使其工作。任何指导将不胜感激。

最佳答案

使用 .Net Core 3.0,您可以将 Windows 身份验证与 Kestrel 一起使用。有一个 Nuget 包:Microsoft.AspNetCore.Authentication.Negotiate
然后你可以在 Startup.ConfigureServices 中添加它:

services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
有关更多信息,另请参阅:
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.0&tabs=visual-studio#kestrel

关于.net - 托管在 Windows 服务中的 Kestrel 的 Windows 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53842990/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com