HttpRequest.Form throws an undocumented System.InvalidOperationException #49096
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
bug
This issue describes a behavior which is not expected - a bug.
Docs
This issue tracks updating documentation
help candidate
Indicates that the issues may be a good fit for community to help with. Requires work from eng. team
net8_docathon
This issue is part of the documentation push in Fall 2023.
Is there an existing issue for this?
Describe the bug
After upgrading from ASP.NET Core 3.x to ASP.NET Core 6, we found that
HttpRequest.Form
throws an undocumentedSystem.InvalidOperationException
with the message "Incorrect Content-Type: image/png".This seems to only affect image files. Using the same code to read CSV files continues to work.
Expected Behavior
Form object is returned.
Steps To Reproduce
No response
Exceptions (if any)
System.InvalidOperationException
.NET Version
7.0.304
Anything else?
The text was updated successfully, but these errors were encountered: