UnsupportedContentTypeException Class

The System.Exception that is added to model state when a model binder for the body of the request is unable to understand the request content type header.

Namespace
Microsoft.AspNetCore.Mvc.ModelBinding
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public class UnsupportedContentTypeException : Exception, ISerializable, _Exception
class Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeException

Constructors

UnsupportedContentTypeException(System.String)

Creates a new instance of Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeException with the specified exception <em>message</em>.

Arguments:message (System.String) – The message that describes the error.
public UnsupportedContentTypeException(string message)