aspnetcore: Host unreachable in https due to weak Http2 cipher
Describe the bug
The browser is not happy with the cipher used for HTTP2 (i guess)
ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY and equivalent in chrome
Bad Workaround
only for firefox
i managed to go in about:config and disable weak cypher check this actually has an effect
is there a simple way to completely disable HTTP2 via a Kestrel IOptions<> ?
To Reproduce
Steps to reproduce the behavior:
- uninstalled ALL sdk
 - removed folder from program files/user/appdata/temp
 - install sdk 
2.2.105and3.0.0-preview3from https://dot.net - version of ASP.NET Core : the one shipped with preview3
 dotnet new webapi -n foo- comment out 
UseHsts - comment out 
UseHttpsRedirection() dotnet run --project foo.csproj- hit the 
httpendpoint => works - hit the 
httpsendpoint => rejected 
Expected behavior
i tried to :
dotnet dev-certs http --cleandotnet dev-certs http --trust- delete 
.vs/ - change 
launchSettings.jsonto anything else - removed 
UseHttpsRedirection() - removed 
UseHsts() - not working for IP / dns in the browser
 
pretty sure all i did was update Vs2019, it was workign 2 weeks ago on the same SDK (or the latest win10 insider - fast ring update)
>dotnet --version
3.0.100-preview3-010431
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0-preview3-19153-02" />
  </ItemGroup>
</Project>
About this issue
- Original URL
 - State: closed
 - Created 5 years ago
 - Reactions: 2
 - Comments: 75 (54 by maintainers)
 
There’s a typo in https://github.com/aspnet/AspNetCore/issues/8952#issuecomment-482499042, but when corrected, this worked:
Yep. We intend to fix our dev cert for 3.0, but as a temporary workaround you can use the IIS Express development certificate directly from Kestrel.
This only works on Windows (but so far the problem has only been reported there), and requires that you have IIS Express installed and configured (installing VS is sufficient for this). You do not actually have to use IIS Express to host your site, we’re just borrowing it’s development certificate 😃.
First you need to find your IIS Express cert in the user certificate store and get the thumbprint. The followng PowerShell script will do the trick:
Once you’ve got the thumbprint, you can write a small bit of code in
Program.csto grab that certificate out of the store and use it for Kestrel.If you run
The powershell script above and then
It should unblock you.
@nphmuller
Did you try running the following commands with a preview6 dotnet environment?
Its likely that you have an old cert. We added logic to upgrade the certificate, but I’m not sure if it made it into preview6 or will be available on preview7.
I have a freshly installed VS2019 Preview 16.2 Preview 2 and this is the first ASP.NET core with Kestrel project that I run and I’m hitting the same issue. I’ve tried the clean/trust commands to refresh the certificate with no change.
dotnet --version3.0.100-preview-010184This is an empty project with .ConfigureKestrel() added without any changes
I imagine that’s because you are using docker containers. That’s the location where docker exports the certificate to import it into the container.
@anurse we could add this to the docs I think. I’m not sure the implications cleaning this folder have for the docker folks, but we can ask them.
What I don’t want is to add this to the tool, as its a docker tooling implementation detail and has nothing to do with the tool.
That said, I don’t think we need to change the runtime here so long as we provide details on what to do if you run into this situation in the docs. I’ve filed https://github.com/aspnet/AspNetCore.Docs/issues/13927 to track it.
@vmandic HTTP/2 isn’t supported on Win8.1, you’ll need to turn it off. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2#http2-support
@anurse The powershell snippet below will create a “aspnetcore compatible” https cert with the addition of Digital Signature. I’ve been trying to repro this on the Win 10 insider builds and I haven’t been able to. Can you get someone on the team to try it out?
More importantly I think we should review the cipher suites offered by IIS and Kestrel. I’m not sure adding the change above is correct, and I would like @blowdart to chime in
@anurse Having read through the issue, but should be doable. Will have to let @blowdart know but if we are just making the key for a more modern key that should be fine. (Again, haven’t read the issue, but I imagine that’s it).
Similar issue: https://github.com/aspnet/AspNetCore/issues/8409