HTTP/2 support in self hosted server

Hello,

I was wondering if there is any documentation on HTTP/2 support in ServiceStack.

We’re running a self hosted server and I’m not sure if it is supported out of the box or we need to configure it somehow. Information on the internet seems to be inconclusive on this topic.

Any help is greatly appreciated.

This is not a configuration in ServiceStack, it’s configured in the underlying .NET Core Server.

The grpc .NET Core 3.0 template which configures HTTP/2 in its appsettings.json.

Be aware that very few HTTP clients have HTTP/2 support, e.g. in order for the web and app dotnet tools to call HTTP/2 web servers it needed a special configured HttpClient with a custom WinHttpHandler.

It’s useful if you’re only serving browsers or gRPC clients which natively support HTTP/2 otherwise you’re likely to run into issues with most HTTP Clients.

Thanks for the quick answer. Since we’re still running on .NET 4.7.2, does this also apply to that scenario?

Their docs says HTTP/2 support requires .NET Core 2.2 or later:

We’re not using ASP.NET Core yet - it’s a self hosting executable.

In any case, the browser developer tools are reporting HTTP/2 as protocol for requests on our office machines so it seems to be working. I just couldn’t find a clear answer on the prerequisites in terms of Windows/.NET versions and things like that (e.g. implemented as a HttpListener feature that is available starting from …). And the application has to be backwards compatible with older Windows versions up to a point.

Your link at least gives a starting point, so thanks for that!

1 Like