James Newton-King

Results 320 comments of James Newton-King

Does this not work? ```cs private static GrpcChannel CreateAuthenticatedChannel(string address) { var credentials = CallCredentials.FromInterceptor((context, metadata) => { if (!string.IsNullOrEmpty(_token)) { metadata.Add("Authorization", $"Bearer {_token}"); } return Task.CompletedTask; }); var channel...

Got it. I just discovered the same thing in a test. Using insecure + channel credentials (i.e. not passed as an argument to a `CallOptions.Credentials`) wasn't considered. I'll see whether...

Fix here: https://github.com/grpc/grpc-dotnet/pull/1802 There is a behavior change here that needs to be discussed before merging.

https://docs.microsoft.com/en-us/aspnet/core/grpc/test-services?view=aspnetcore-6.0

Yes. This isn't something that can be fixed in grpc-dotnet. I'm going to leave open for now while discussion happens with client networking team. Might close in the future in...

.NET Framework only supports HTTP/1.1 (unless WinHttpHandler is configured). That's fine, because gRPC-Web works over HTTP/1.1. An ASP.NET Core gRPC project is configured by default to HTTP/2 only. This is...

I think it would be worth having troubleshooting docs for this situation.

Docs that discuss this: https://learn.microsoft.com/en-us/aspnet/core/grpc/grpcweb?view=aspnetcore-6.0#http-protocol

Showing how to send a username/password isn't that valuable. I agree that it is up to the app to decide how to authenticate getting the token. I think it would...