Skip to content

Returning HTML using Produces("text/html") causes 406 response #4846

@mohd-akram

Description

@mohd-akram

After upgrading to ASP.NET Core 2.0, [Produces("text/html")] doesn't seem to work anymore. I am returning a string in my action using Ok(str) with that attribute specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing one

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions