![](/img/trans.png)
[英]Asp.Net core bug? Blazor/Http.Sys with Windows Authentication shows "The connection was reset"?
[英]Make Http.sys work with Windows Authentication
我嘗試通過以下鏈接使 Window 身份驗證與 Kestrel 一起工作:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys?view=aspnetcore-3.0#how-to-use-https://learn.microsoft.com/en-us _ /aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.0&tabs=visual-studio#httpsys
這是代碼。
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseHttpSys(options =>
{
options.AllowSynchronousIO = true;
options.Authentication.Schemes = AuthenticationSchemes.None;
options.Authentication.AllowAnonymous = true;
options.MaxConnections = null;
options.MaxRequestBodySize = 30000000;
options.UrlPrefixes.Add("https://localhost:8080");
});
webBuilder.UseStartup<Startup>()
.UseHttpSys(options =>
{
options.Authentication.Schemes =
AuthenticationSchemes.NTLM |
AuthenticationSchemes.Negotiate;
options.Authentication.AllowAnonymous = false;
});
});
但是,瀏覽https://localhost:8080顯示如下錯誤信息(Edge)?
無法安全連接到此頁面 這可能是因為該站點使用了過時或不安全的 TLS 安全設置。 如果這種情況持續發生,請嘗試聯系該網站的所有者。
這是因為你的機器上沒有安裝開發認證。 試試這個:
dotnet dev-certs https --trust
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.