This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides programmatic configuration for the MVC framework.
public ref class MvcOptionspublic ref class MvcOptions : System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Mvc::Infrastructure::ICompatibilitySwitch ^>public class MvcOptionspublic class MvcOptions : System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Infrastructure.ICompatibilitySwitch>type MvcOptions = classtype MvcOptions = class interface seq<ICompatibilitySwitch> interface IEnumerablePublic Class MvcOptionsPublic Class MvcOptionsImplements IEnumerable(Of ICompatibilitySwitch)| Name | Description |
|---|---|
| MvcOptions() | Creates a new instance ofMvcOptions. |
| Name | Description |
|---|---|
| AllowBindingHeaderValuesToNonStringModelTypes | Gets or sets a value that determines ifHeaderModelBinder should bind to types other thanString or a collection ofString. If set to |
| AllowCombiningAuthorizeFilters | Gets or sets a value that determines if policies on instances ofAuthorizeFilterwill be combined into a single effective policy. The default value of the property is |
| AllowEmptyInputInBodyModelBinding | Gets or sets the flag which decides whether body model binding (for example, on anaction method parameter withFromBodyAttribute) should treat emptyinput as valid. |
| AllowShortCircuitingValidationWhenNoValidatorsArePresent | Gets or sets a value that determines ifValidationVisitorcan short-circuit validation when a model does not have any associated validators. |
| AllowValidatingTopLevelNodes | Gets or sets a value that determines if model bound action parameters, controller properties, page handlerparameters, or page model properties are validated (in addition to validating their elements orproperties). If set to |
| CacheProfiles | Gets a Dictionary of CacheProfile Names,CacheProfile which are pre-defined settings forresponse caching. |
| Conventions | Gets a list ofIApplicationModelConvention instances that will be applied totheApplicationModel when discovering actions. |
| EnableActionInvokers | Gets or sets the flag that determines if MVC should use action invoker extensibility. This will allowcustomIActionInvokerFactory andIActionInvokerProvider execute during the request pipeline. |
| EnableEndpointRouting | Gets or sets a value that determines if routing should use endpoints internally, or if legacy routinglogic should be used. Endpoint routing is used to match HTTP requests to MVC actions, and to generateURLs withIUrlHelper. |
| Filters | Gets a collection ofIFilterMetadata which are used to construct filters thatapply to all actions. |
| FormatterMappings | Used to specify mapping between the URL Format and corresponding media type. |
| InputFormatterExceptionPolicy | Gets or sets a value which determines how the model binding system interprets exceptions thrown by anIInputFormatter.The default value of the property isAllExceptions. |
| InputFormatters | Gets a list ofIInputFormatters that are used by this application. |
| MaxIAsyncEnumerableBufferLimit | Gets or sets the most number of entries of anIAsyncEnumerable<T> thatthatObjectResultExecutor will buffer. WhenValue is an instance ofIAsyncEnumerable<T>,ObjectResultExecutor will eagerly read the enumeration and add to a synchronous collectionprior to invoking the selected formatter.This property determines the most number of entries that the executor is allowed to buffer. |
| MaxModelBindingCollectionSize | Gets or sets the maximum size of a complex collection to model bind. When this limit is reached, the modelbinding system will throw anInvalidOperationException. |
| MaxModelBindingRecursionDepth | Gets or sets the maximum recursion depth of the model binding system. TheDefaultModelBindingContext will throw anInvalidOperationException if more thanthis number ofIModelBinders are on the stack. That is, an attempt to recurse beyond thislevel will fail. |
| MaxModelValidationErrors | Gets or sets the maximum number of validation errors that are allowed by this application before furthererrors are ignored. |
| MaxValidationDepth | Gets or sets the maximum depth to constrain the validation visitor when validating. Set to ValidationVisitor traverses the object graph of the model being validated. For modelsthat are very deep or are infinitely recursive, validation may result in stack overflow. When not |
| ModelBinderProviders | Gets a list ofIModelBinderProviders used by this application. |
| ModelBindingMessageProvider | Gets the defaultModelBindingMessageProvider. Changes here are copied to theModelBindingMessageProvider property of allModelMetadatainstances unless overridden in a customIBindingMetadataProvider. |
| ModelMetadataDetailsProviders | Gets a list ofIMetadataDetailsProvider instances that will be used tocreateModelMetadata instances. |
| ModelValidatorProviders | Gets a list ofIModelValidatorProviders used by this application. |
| OutputFormatters | Gets a list ofIOutputFormatters that are used by this application. |
| RequireHttpsPermanent | Gets or sets the default value for the Permanent property ofRequireHttpsAttribute. |
| RespectBrowserAcceptHeader | Gets or sets the flag which causes content negotiation to ignore Accept headerwhen it contains the media type |
| ReturnHttpNotAcceptable | Gets or sets the flag which decides whether an HTTP 406 Not Acceptable responsewill be returned if no formatter has been selected to format the response. |
| SslPort | Gets or sets the SSL port that is used by this application whenRequireHttpsAttributeis used. If not set the port won't be specified in the secured URL e.g. https://localhost/path. |
| SuppressAsyncSuffixInActionNames | Gets or sets a value that determines if MVC will remove the suffix "Async" applied tocontroller action names. ActionName is used to construct the route to the action aswell as in view lookup. When This option does not affect values specified usingActionNameAttribute. |
| SuppressBindingUndefinedValueToEnumType | Gets or sets a value indicating whether the model binding system will bind undefined values toenum types. The default value of the property is |
| SuppressImplicitRequiredAttributeForNonNullableReferenceTypes | Gets or sets a value that determines if the inference ofRequiredAttribute forproperties and parameters of non-nullable reference types is suppressed. If |
| SuppressInputFormatterBuffering | Gets or sets a value that determines if buffering is disabled for input formatters thatsynchronously read from the HTTP request body. |
| SuppressOutputFormatterBuffering | Gets or sets the flag that determines if buffering is disabled for output formatters thatsynchronously write to the HTTP response body. |
| ValidateComplexTypesIfChildValidationFails | Gets or sets a value that determines whether the validation visitor will perform validation of a complex typeif validation fails for any of its children.<seealso cref="P:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.ValidateComplexTypesIfChildValidationFails"></seealso> |
| ValueProviderFactories | Gets a list ofIValueProviderFactory used by this application. |
| Name | Description |
|---|---|
| IEnumerable.GetEnumerator() | |
| IEnumerable<ICompatibilitySwitch>.GetEnumerator() | |
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?