MvcXmlOptions.AllowRfc7807CompliantProblemDetailsFormat Property

Definition

Gets or sets a value inidicating whether ProblemDetails and ValidationProblemDetails are serialized in a format compliant with the RFC 7807 specification (https://tools.ietf.org/html/rfc7807).

public:
 property bool AllowRfc7807CompliantProblemDetailsFormat { bool get(); void set(bool value); };
public bool AllowRfc7807CompliantProblemDetailsFormat { get; set; }
member this.AllowRfc7807CompliantProblemDetailsFormat : bool with get, set
Public Property AllowRfc7807CompliantProblemDetailsFormat As Boolean

Property Value

The default value is true if the version is Version_2_2 or later; false otherwise.

Remarks

This property is associated with a compatibility switch and can provide a different behavior depending on the configured compatibility version for the application. See CompatibilityVersion for guidance and examples of setting the application's compatibility version.

Configuring the desired value of the compatibility switch by calling this property's setter will take precedence over the value implied by the application's CompatibilityVersion.

If the application's compatibility version is set to Version_2_1 or lower then this setting will have the value false unless explicitly configured.

If the application's compatibility version is set to Version_2_2 or higher then this setting will have the value true unless explicitly configured.

Applies to