How to make the .net HttpClient use http 2.0?

1.Make sure you are on the latest version of Windows 10. 2.Install WinHttpHandler: Install-Package System.Net.Http.WinHttpHandler 3.Extend WinHttpHandler to add http2.0 support: public class Http2CustomHandler : WinHttpHandler { protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { request.Version = new Version(“2.0”); return base.SendAsync(request, cancellationToken); } } 4.Pass above handler to the HttpClient constructor using (var httpClient = … Read more

Config Error: This configuration section cannot be used at this path

I had the same problem. Don’t remember where I found it on the web, but here is what I did: Click “Start button” in the search box, enter “Turn windows features on or off” in the features window, Click: “Internet Information Services” Click: “World Wide Web Services” Click: “Application Development Features” Check (enable) the features. … Read more