aspnet / AspNetWebStack

ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)
Other
858 stars 354 forks source link

FormUrlEncodedMediaTypeFormatter.ReadFromStreamAsync is synchronous #270

Closed freerangegreg closed 4 years ago

freerangegreg commented 4 years ago

I've recently switched over to Azure Functions v3 (core 3.1) and got hit by the new requirement that everything is synchronous: https://docs.microsoft.com/en-us/dotnet/core/compatibility/aspnetcore#http-synchronous-io-disabled-in-all-servers

This causes issues with using HttpContentFormDataExtensions.ReadAsFormDataAsync to parse form data. This eventually calls FormUrlEncodedMediaTypeFormatter.ReadFromStreamAsync, which is a thin wrapper over a synchronous implementation. The fix would be to write a proper async version.

mkArtakMSFT commented 4 years ago

Thank you for contacting us. We are currently only fixing critical functional issues in the code base, and have decided to not make this change.