grpc service gives error "Bad gRPC response. Expected HTTP status code 200. Got status code: 426" when deployed on Azure where works fine locally when run on IIS Express #578
Labels
bug
Something isn't working
I have created a gRPC service..
Using gRPC service by using Client, which has gRPC Service reference.
Created a console app to test the service. When service is running locally (https://localhost:5001) and called from console app, works fine.
When service is deploy on Azure as Appservice, gives error: Bad gRPC response. Expected HTTP status code 200. Got status code: 426 when being called from console app
ErrorMessage: Bad gRPC response. Expected HTTP status code 200. Got status code: 426
What version of gRPC and what language are you using?
Grpc.AspNetCore Version="2.23.1"
What operating system (Linux, Windows,...) and version?
Azure Appservice for windows
netcoreapp3.0
xxxxxxxxxxxxxxxxxxxxxxxxx
.NET Core SDK
.NET core 3.0
What did you do?
Create a sample gRPC .NET Core 3.0 application using visual studio.
create a client to consume the service.
Deploy gRPC service to Azure as Appservice (windows).
Consume the service from a console app.
How gRPC is being called?
Using service via client
var channel = GrpcChannel.ForAddress("https://xxxx.azurewebsites.net"); var client = new RequestorClient(channel); var response = SubmitRequest(client,request)
in above code , it works fine when url is https://localhost:5001
Publish setting
What did you expect to see?
Successfull call to service, HTTP status code 200
ErrorMessage
Bad gRPC response. Expected HTTP status code 200. Got status code: 426
Stacktrace
" at Grpc.Net.Client.Internal.GrpcCall
2.<GetResponseAsync>d__63.MoveNext()\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()\r\n"The text was updated successfully, but these errors were encountered: