ASP.NET Core 3.0, released on September 23, 2019, disables synchronous input and output on web request and response streams by default. Application teams upgrading from 2.2 need to inspect calls that read a request body, write a response or flush a stream. Microsoft's migration guide identifies those operations as affected, and the Kestrel web server's 3.0.0 source sets AllowSynchronousIO to false. The upgrade check therefore belongs in request handling, not just the startup sequence. This retrospective uses a migration-guide revision from the release day and the version-tagged server source retrieved later; the source file has no separately established publication date. [S1][S6][S4]

Microsoft's guide describes the synchronous APIs as a source of thread starvation leading to application crashes. The named examples are HttpRequest.Body.Read, HttpResponse.Body.Write and Stream.Flush. This is a change to how the web server permits those operations, not a statement that all synchronous work in a .NET application is prohibited. Re-enabling the option permits the calls; it does not turn them into asynchronous operations. [S6][S4]

Cleanup deserves a separate check. The migration guide warns about TextWriter implementations and other streams that invoke synchronous APIs from Dispose, the operation used to release their resources. It advises using DisposeAsync instead when that causes trouble. For maintainers, the implication is to test the end of the request as well as its main read or write: an apparently asynchronous path can still reach a synchronous operation when its writer is disposed of. [S6]

Microsoft documents two ways to allow synchronous I/O again: Kestrel configuration through ConfigureKestrel, and a per-request override presented as temporary mitigation. The latter uses IHttpBodyControlFeature from the request's HttpContext and sets AllowSynchronousIO to true if that feature is available. These have different scopes. A request-level exception can be confined to the affected path rather than relaxing the server setting for other requests. [S6][S4]

For a request that needs temporary relief, keep the exception attached to a specific stream operation and test its removal after that operation is changed. The test should finish disposing of the writer, not stop once the response has been written. [S6]

Source documents

  1. Announcing .NET Core 3.0https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0/
  2. KestrelServerOptions.cs — ASP.NET Core v3.0.0https://raw.githubusercontent.com/dotnet/aspnetcore/v3.0.0/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs
  3. Migrate from ASP.NET Core 2.2 to 3.0 — historical repository revisionhttps://raw.githubusercontent.com/dotnet/AspNetCore.Docs/9888c40de1e10b4eec33c6610ef138d51e8ec955/aspnetcore/migration/22-to-30.md