From 37206f81743b043911627810523ce7eca40cb485 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 30 Jun 2020 23:23:08 +1200 Subject: [PATCH] gRPC-Web with bidirectional streaming on IIS/Azure (#19012) --- aspnetcore/grpc/browser.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/aspnetcore/grpc/browser.md b/aspnetcore/grpc/browser.md index 441cecb05d..c2f7316e7c 100644 --- a/aspnetcore/grpc/browser.md +++ b/aspnetcore/grpc/browser.md @@ -4,7 +4,7 @@ author: jamesnk description: Learn how to configure gRPC services on ASP.NET Core to be callable from browser apps using gRPC-Web. monikerRange: '>= aspnetcore-3.0' ms.author: jamesnk -ms.date: 06/29/2020 +ms.date: 06/30/2020 no-loc: [Blazor, "Blazor Server", "Blazor WebAssembly", "Identity", "Let's Encrypt", Razor, SignalR] uid: grpc/browser --- @@ -67,6 +67,15 @@ The preceding code: * Calls `UseCors` to add the CORS middleware after routing and before endpoints. * Specifies the `endpoints.MapGrpcService()` method supports CORS with `RequiresCors`. +### gRPC-Web and streaming + +Traditional gRPC over HTTP/2 supports streaming in all directions. gRPC-Web offers limited support for streaming: + +* gRPC-Web browser clients don't support calling client streaming and bidirectional streaming methods. +* ASP.NET Core gRPC services hosted on Azure App Service and IIS don't support bidirectional streaming. + +When using gRPC-Web, we only recommend the use of unary methods and server streaming methods. + ## Call gRPC-Web from the browser Browser apps can use gRPC-Web to call gRPC services. There are some requirements and limitations when calling gRPC services with gRPC-Web from the browser: