在 Windows 10 中的 HTTP.SYS 和 IIS 中禁用 HTTP/2/SPDY [英] Disabling HTTP/2 / SPDY in HTTP.SYS and IIS in Windows 10

查看:37
本文介绍了在 Windows 10 中的 HTTP.SYS 和 IIS 中禁用 HTTP/2/SPDY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 10 上进行测试时,我们发现了许多浏览器不兼容问题,这是我以前在 Windows 早期版本中从未见过的.某些浏览器可以工作,但其他浏览器会报告 ERR_SPDY_PROTOCOL_ERROR.我对这个问题的快速搜索表明我并不孤单.

When testing on Windows 10 we were seeing lots of browser incompatibilities that I hadn't seen before with earlier Windows versions. Some browsers would work, but others would report ERR_SPDY_PROTOCOL_ERROR. My quick search for this problem showed I was not alone.

我的应用程序使用 WWSAPI 和 HTTP.SYS 和 HTTPS (TLS).有谁知道如何在 Windows 10 上的 WWSAPI(使用 HTTP.SYS)中禁用 SPDY/HTTP/2?

My app uses WWSAPI and HTTP.SYS with HTTPS (TLS). Does anyone know how to disable SPDY / HTTP/2 in WWSAPI (which is using HTTP.SYS) on Windows 10?

我也很想获得 HTTP.SYS 的完整最新的 Windows 10 注册表设置列表.

I'd also love to get a full up-to-date Windows 10 list of registry settings for HTTP.SYS.

我对此的回答见下文.希望这对其他人也有帮助.

See below for my answer to this. Hope this helps others too.

标记

推荐答案

禁用 HTTP/2 会显着降低您网站的速度,这不是永久性的解决方案.问题原来是由我们的 web 应用程序向服务器发送了错误的身份验证标头引起的.

disabling HTTP/2 will significantly slow down the speed of your website, this is not a permanent solution. The problem turned out to be caused by our webapp sending a wrong authentication header to the server.

要仍然禁用 HTTP/2,请参见下文.

To still disable HTTP/2, see below.

(OP 给出了有用的答案,但在问题中.我移动了答案):

(OP gave a helpful answer, but in the question. I moved the answer):

我确实通过配置 Windows 10 HTTP.SYS 解决了我的 HTTP/2 问题在注册表中禁用 HTTP/2.鉴于我没有找到信息在任何地方,我想我也会在这里分享我对这个问题的解决方案.一世虽然想通过 WWSAPI 找到一种方法来做到这一点.

I did work around my HTTP/2 problem by configuring Windows 10 HTTP.SYS in the registry to disable HTTP/2. Given that I didn't find info anywhere, I thought I'd share my solution to that problem here too. I would like to find a way of doing this through WWSAPI though.

如果我在客户端浏览器中关闭 SPDY 支持,它会工作,但我想在服务器端关闭它(Windows 10 上的 HTTP.SYS)这样它就不会协商 HTTP/2 而是使用更旧的兼容 HTTP(S).

If I turned off SPDY support in the client browser, it would work but I wanted to turn this off at the server side (HTTP.SYS on Windows 10) so that it wouldn't negotiate HTTP/2 but would use the older more compatible HTTP(S).

在以下位置发现 HTTP.SYS 的两个新注册表设置:

Discovered two new registry settings for HTTP.SYS in:

HKEY_LOCAL_MACHINESystemCurrentControlSetServicesHTTPParameters

  • EnableHttp2Tls REG_DWORD 0
  • EnableHttp2Cleartext REG_DWORD 0

在 Windows 10 中添加这些值并将两者都设置为 0 导致HTTP/2/SPDY 没有被协商,我的 ERR_SPDY_PROTOCOL_ERROR不需要更改浏览器配置,问题就消失了.我并不是说 Windows 10 HTTP/2 有什么问题,问题可能与某些浏览器有关.

Adding these values and setting both to 0 in Windows 10 resulted in HTTP/2 / SPDY not being negotiated and my ERR_SPDY_PROTOCOL_ERROR problems went away without requiring browser configuration changes. I'm not suggesting there is anything wrong with Windows 10 HTTP/2, the problems may be with certain browsers.

这也适用于 IIS,但我不使用它,所以我还没有尝试过无论如何,在 IIS 中可能有更好的方法来做到这一点.

This may work for IIS too, but I don't use that so I haven't tried and in any case there may be a better way to do this in IIS.

希望这对其他人也有帮助.

Hope this helps others too.

我可以确认这对 IIS 也有帮助,但我必须重新启动计算机.

I can confirm this helps for IIS too, but I had to restart my computer.

这篇关于在 Windows 10 中的 HTTP.SYS 和 IIS 中禁用 HTTP/2/SPDY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆