Issue with your Blazor Example for gRPC-Web
See original GitHub issueWhat version of gRPC and what language are you using?
2.30 - Net.Client.Web - C#
What operating system (Linux, Windows,…) and version?
Windows 10 2020
What runtime / compiler are you using (e.g. .NET Core SDK version dotnet --info
)
.NET SDK (reflecting any global.json): Version: 5.0.100-preview.5.20279.10 Commit: 8139f1b74e
Runtime Environment: OS Name: Windows OS Version: 10.0.19041 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.100-preview.5.20279.10\
Host (useful for support): Version: 5.0.0-preview.5.20278.1 Commit: 4ae4e2fe08
.NET SDKs installed: 3.1.301 [C:\Program Files\dotnet\sdk] 3.1.302 [C:\Program Files\dotnet\sdk] 5.0.100-preview.5.20279.10 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.All 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.0-preview.5.20279.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.0-preview.5.20278.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.0-preview.5.20278.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
What did you do?
I was trying to run your Blazor Example but it does not work : https://github.com/grpc/grpc-dotnet/tree/master/examples/Blazor It does not work and client cannot receive messages. getting Exception instead,… 😦
What did you expect to see?
Well simple no error
What did you see instead?
Data fetched from a gRPC service.
at Client.Pages.FetchData.OnInitializedAsync () <0x2241dc8 + 0x0011a> in <filename unknown>:0 Status(StatusCode=“Internal”, Detail=“Error starting gRPC call. JSException: TypeError: Failed to fetch”, DebugException="WebAssembly.JSException: TypeError: Failed to fetch at System.Net.Http.WebAssemblyHttpHandler.doFetch (System.Threading.Tasks.TaskCompletionSource1[TResult] tcs, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) <0x231d480 + 0x00a54> in <filename unknown>:0 at System.Net.Http.WebAssemblyHttpHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) <0x23015e0 + 0x001be> in <filename unknown>:0 at Grpc.Net.Client.Web.GrpcWebHandler.SendAsyncCore (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) <0x22e6d60 + 0x001a0> in <filename unknown>:0 at Grpc.Net.Client.Internal.GrpcCall
2[TRequest,TResponse].RunCall (System.Net.Http.HttpRequestMessage request, System.Nullable`1[T] timeout) <0x22ddbf8 + 0x003ec> in <filename unknown>:0 ")
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
See TROUBLESHOOTING.md for how to diagnose problems better.
Anything else we should know about your project / environment?
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (3 by maintainers)
Top GitHub Comments
Ok sorted: i guess this is my bad… 😦 shame on me but still if you select iis it works with classic http clinet server model… Well ok i know this now… thx for all help…
I have this same configuration but still getting the cors error. If you don’t mind me asking. Did you setup your GrpcChannel on the client with specific channel options?