deploy a .NET 6 gRPC app on App Service -Error starting gRPC call.

Linda Lawton 1 Reputation point
2022-11-10T08:55:29.57+00:00

I have been following https://github.com/Azure/app-service-linux-docs/blob/master/HowTo/gRPC/use_gRPC_with_dotnet.md

I have serval issues. the first being that i can not add the following to my project

builder.WebHost.ConfigureKestrel(options =>
{
options.ListenAnyIP(8080);
options.ListenAnyIP(8585, listenOptions =>
{
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http2;
});
});

When I do it breaks everything else in the project, none of the rest api end points respond, swagger wont even run locally.

The seciond being when hosting this project in App service. Without the above lines of code. The rest api endpoints still work but i have not been able to contact gRPC.

The following error results:

StatusCode="Unavailable", Detail="Error starting gRPC call. HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I have checked and HTTP/2 is enabled. I am wondering if the issue could be with the fact that this is a Public Preview feature do i need to do anythign to enable it?

Stackoverflow: https://stackoverflow.com/q/74377941/1841839
Issue forum: https://github.com/Azure/app-service-linux-docs/issues/144

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.