You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in ASP.NET Core 2.0.0 RTM, synchronous request and response IO will be disallowed by default.
For example, HttpContext.Request.Body.Read and HttpContext.Response.Body.Write will both throw InvalidOperationExceptions with a message communicating that either the equivalent async API should be called or synchronous IO should be explicitly allowed using IHttpBodyControlFeature.AllowSynchronousIO.
Synchronous IO hasn't been disallowed by default yet. After 2.0.0-preview2, there will be changes to both Kestrel and HttpSysServer to disallow this. Both servers will have a property added to their respective Options classes to globally allow synchronous IO.
Note: This change only impacts the request and response Stream APIs.
We're closing this issue/announcement for now due to incompatibilities this introduces with existing BCL types that are either difficult or impossible to work around without fully buffering. We hope to introduce this breaking change in a future major release.
Starting in ASP.NET Core 2.0.0 RTM, synchronous request and response IO will be disallowed by default.
For example,
HttpContext.Request.Body.Read
andHttpContext.Response.Body.Write
will both throwInvalidOperationExceptions
with a message communicating that either the equivalent async API should be called or synchronous IO should be explicitly allowed using IHttpBodyControlFeature.AllowSynchronousIO.Synchronous IO hasn't been disallowed by default yet. After 2.0.0-preview2, there will be changes to both Kestrel and HttpSysServer to disallow this. Both servers will have a property added to their respective Options classes to globally allow synchronous IO.
Note: This change only impacts the request and response Stream APIs.
Please use aspnet/ServerTests#86 for further discussion.
The text was updated successfully, but these errors were encountered: