问题标签 [http.sys]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - 使用 HTTP.sys 启用 windows 身份验证 #Error: read ECONNRESET ASP.NET Core
我想使用 Http.sys 启用 Windows 身份验证并使用 POSTman 发送 GET 请求。我已经输入了我的电脑账号和密码,但是邮递员告诉我这个错误。不知道发生了什么,谁能告诉我原因?
在 ASP.NET Core 中配置 Windows 身份验证
更新
我的目的
Startup.cs
程序.cs
asp.net-core - Remove Microsoft-HTTPAPI/2.0 from the response header Server (Self-hosted Http.Sys)
How do i suppress or remove the HTTP response header 'Server: Microsoft-HTTPAPI/2.0'? Penetration testing has revealed that it is a security vulnerability to disclose the server platform.
I have a self-hosted asp.net core web application running on Windows Server 2019 and am using Http.Sys instead of Kestrel since I need NTML authentication.
According to Microsoft, the response header can be turned off via the registry, but it does not work for me. I have set the DisableServerHeader to 2 in the registry per HTTP.SYS registry settings and rebooted the server.
- If I do not add a response header, it will be added automatically. Server: Microsoft-HTTPAPI/2.0
- If I add a response header, the value will be added automatically. Server: my-dumy-value Microsoft-HTTPAPI/2.0
Update, I found the issue! I failed to enter the parameter name correctly, a traling space was revealed when I exported the key. It works as expected after removing the space and rebooting the server.
c# - 似乎 HTTP/2 不适用于 Http.Sys 在 asp.net 中提供的身份验证
想象一下,我在同一个域上有两个服务: https ://example.com:5001和https://example.com:5002
https://example.com:5001有这样的 http.sys 设置
而https://example.com:5002有这个选项:
当我向第一个服务发送请求时,我遇到了不同的问题:
- 通过 HttpClient -> WinHttpHandler:
响应有 StatusCode 200,但协议版本降级到 1.1
- 通过 HttpClient -> HttpClientHandler:
响应有 StatusCode 401、未授权和协议版本 2.0
- 通过 HttpWebRequest:
抛出异常:当前仅支持 HTTP/1.0 和 HTTP/1.1 版本请求。(参数“值”)
对https://example.com:5002的所有相同请求都具有状态码 200 和协议版本 HTTP/2
我认为身份验证在 http.sys 中无法与 HTTP/2 一起正常工作,或者我做错了什么。
有什么想法可以正常工作吗?先感谢您!
azure - 没有监听端口 80,Windows 防火墙关闭,使用 System.Net.HttpListener 的 .NET 应用程序运行良好
我有一个在没有获得任何 HTTP 流量的 VM 中运行的 Windows 服务。这是出乎意料的。
该应用程序是作为“NTAUTHORITY\Local Service”运行的 Windows 服务。它实现了 System.net.HttpListener 来监听端口 80 上的 HTTP 流量。我启动了 Windows 服务。它记录它已启动并已注册前缀“http:///api/”。我运行netstat -tan
并且 0.0.0.0:80 没有显示为正在监听的本地地址之一。
我已经关闭了所有 3 个防火墙,私有、域和公共,并退回了我的服务。没变。重新启动虚拟机,也没有改变。
我确实有一个通过"netsh http add urlacl url="<dns-name>:80/api" user="NTAUTHORITY\LocalService"
.
我错过了什么?为什么这不起作用?
c# - 如何使用 HTTP.sys Web 服务器在 ASP NET Core 应用程序中获取 TLS 版本的请求
我正在尝试在 HTTP.sys Web 服务器上运行的 ASP.NET Core 应用程序中获取 HTTP 请求的 TLS 版本 - 请参阅此处了解更多详细信息。
到目前为止,我已经尝试了以下方法,但都没有奏效:
- 从请求上下文中获取ITlsHandshakeFeature - 返回 null。我认为它仅适用于 Kestrel。
- 获取IServerVariablesFeature - 返回 null。
我看到的最接近的是这里的 SslStatus和这里的 TLS 客户端证书,但我没有看到任何获取 TLS 版本的选项
需要明确的是,我并不是要为服务器启用或禁用特定的 TLS 版本。我只是想为传入的 HTTP 请求获取 TLS 版本。HTTP.sys Web 服务器是否向 Web 应用程序公开 TLS 握手详细信息?