public void ConfigureServices(IServiceCollection services) { // If using Kestrel: services.Configure(options => { options.AllowSynchronousIO = true; }); // If using IIS: services.Configure(options => { options.AllowSynchronousIO = true; }); }