Skip to content

net_http_synchronous_reads_not_supported in Blazor wasm (net10) #5382

Description

@rwb196884

Setup: net10. A webAPI project with Swagger set up to generate a C# proxy class. A Blazor client/server pair that uses the generated proxy. Using the proxy on the client side fails with error net_http_synchronous_reads_not_supported.

Full example: https://github.com/rwb196884/duende-samples/tree/main/BFF/v4/BlazorAutoRendering

According to #5301 the fix should be to replace Command="$(NSwagExe) ... with Command="$(NSwagExe_Net100) ... which I have done in BlazorAutoRendering.Api.Swaggergen.csproj, but clearly this is not working.

Activity

  1. facepalmgamer commented on Jun 15, 2026

    @facepalmgamer

    I was able to fix it with <WasmEnableStreamingResponse>false</WasmEnableStreamingResponse> in the clients .csproj inside the <propertygroup> tag, dont know what that does but it fixed it and ima just move on till there is a proper fix

  2. GildartsClive98 commented on Jul 3, 2026

    @GildartsClive98

    I have the same problem...to correctly read the response on wasm the ReadResponseAsString flag must be true..i dont readed all generated client but if i understand correctly this is because in wasm in .net 10 Newtonsoft try to read the http response in synchronous mode but the new .net method only allow async read...can you please somehow fix this..the false is only a workaround that use memorystream insead of the BrowserHttpReadStream but its not the better way for big response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions