Articles in this section
Category / Section

How to resolve the unsupported media type error on loading image in ASP.NET Core


Unsupported media type error occurs on the loading image in the Report Viewer and Report designer because of the ApiController attribute. This attribute will not allow for file byte content. You can resolve the error by following these steps.

  1. Remove the [ApiController] attribute in your controller because it is not supported to get the image from API.

  2. Then add the [FromBody] attribute with the PostReportAction action as shown below because we have removed the ApiController attribute from the controller.


See also

Display ssrs rdl report in Bold Reports ASP.NET Core Report Viewer

Was this article useful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied