c# ReadToEnd Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead. code example
Example: c# AllowSynchronousIO to true
public void ConfigureServices(IServiceCollection services)
{
// If using Kestrel:
services.Configure<KestrelServerOptions>(options =>
{
options.AllowSynchronousIO = true;
});
// If using IIS:
services.Configure<IISServerOptions>(options =>
{
options.AllowSynchronousIO = true;
});
}