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
I have been using the XmlSerializer for years, and I am using it in a project that I upgraded to .NET Core 3.0 Preview 5 today. After the upgrade, I receive the following exception when I try to XmlSerialize.Deserialize (Stream) the Request stream in a custom middleware component:
Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead
Prior to the upgrade, everything was working fine, so there is definitely something broken in in this serializer. If I update the Kestrel options as follows, it works fine:
.UseKestrel((context, options) =>
{
// Temporary? The XmlSerializer is only performing synchronous operations.
options.AllowSynchronousIO = true;
})
The text was updated successfully, but these errors were encountered:
What has changed isn't the XmlSerializer but Kestrel. The default value of AllowSynchronousIO was true, it has been changed to false in 3.0: dotnet/aspnetcore@93a24b0
XmlSerializer has never supported async operations.
I have been using the XmlSerializer for years, and I am using it in a project that I upgraded to .NET Core 3.0 Preview 5 today. After the upgrade, I receive the following exception when I try to XmlSerialize.Deserialize (Stream) the Request stream in a custom middleware component:
Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead
Prior to the upgrade, everything was working fine, so there is definitely something broken in in this serializer. If I update the Kestrel options as follows, it works fine:
The text was updated successfully, but these errors were encountered: