Fix: InvalidOperationException: Synchronous operations are disallowed
Replace the Stream.Read or Write call with ReadAsync/WriteAsync. As a last resort, set AllowSynchronousIO on Kestrel, IIS, or per-request via IHttpBodyControlFeature.
Page 23 of 56