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

Install webdeploy on W2016 IIS 10

I have to install new management tool called “Management Service” in Windows Features In order to install this: Open server roles / feature Find Management Tools Check Management service Update from other people experience you might need to restart the service Reinstall/Repair the installation of web deploy if you used installer There is a option … Read more

What is the file location of applicationhost.config in the different versions of IIS?

For the “big” IIS versions since IIS 7, the location is always the same: %windir%\System32\inetsrv\config\applicationHost.config For IIS Express there is one per user, the default location is: %USERPROFILE%\Documents\IISExpress\config\applicationhost.config again it’s the same for all versions. You can run multiple instances of IIS Express per user, you would need to specify the location of the applicationhost.config … Read more

HTTP Error 500.31 – ANCM Failed to Find Native Dependencies in IIS

I have received the same error after upgrading my ASP.NET Core project from .NET Core 3.0 to 3.1 and installing Microsoft .NET Core 3.1.0 – Windows Server Hosting. Quick (but bad) fix changed the web.config handler from AspNetCoreModuleV2 to AspNetCoreModule and it worked ok. Good fix Find the underlying cause by inspecting Event Viewer. There … Read more

applicationhost.config file path in IIS 7, 7.5, 8, 8.5 and IIS 10?

For the “big” IIS versions since IIS 7, the location is always the same: %windir%\System32\inetsrv\config\applicationHost.config For IIS Express there is one per user, the default location is: %USERPROFILE%\Documents\IISExpress\config\applicationhost.config again it’s the same for all versions. You can run multiple instances of IIS Express per user, you would need to specify the location of the applicationhost.config … Read more

IIS: How to serve a file without extension?

Assuming (path) is a physical directory on your machine, create a new web.config file in that directory with the following content: <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <staticContent> <mimeMap fileExtension=”.” mimeType=”text/xml” /> </staticContent> </system.webServer> </configuration> You are telling IIS that for this directory only, any file without an otherwise defined extension (in MIME types) should be … 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