Export (0) Print
Expand All

HttpConfiguration Class

Represents a configuration of HttpServer instances.

Namespace:  System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

public class HttpConfiguration implements IDisposable

The HttpConfiguration type exposes the following members.

  NameDescription
Public methodHttpConfiguration()Initializes a new instance of the HttpConfiguration class.
Public methodHttpConfiguration(HttpRouteCollection)Initializes a new instance of the HttpConfiguration class with an HTTP route collection.
Top

  NameDescription
Public propertyDependencyResolverGets or sets the dependency resolver associated with thisinstance.
Public propertyFiltersGets the list of filters that apply to all requests served using this HttpConfiguration instance.
Public propertyFormattersGets the media-type formatters for this instance.
Public propertyIncludeErrorDetailPolicyGets or sets a value indicating whether error details should be included in error messages.
Public propertyInitializer Gets or sets the action that will perform final initialization of the HttpConfiguration instance before it is used to process requests.
Public propertyMessageHandlersGets an ordered list of DelegatingHandler instances to be invoked as an HttpRequestMessage travels up the stack and an HttpResponseMessage travels down in stack in return.
Public propertyParameterBindingRulesGets the collection of rules for how parameters should be bound.
Public propertyPropertiesGets the properties associated with this instance.
Public propertyRoutesGets the HttpRouteCollection associated with this HttpConfiguration instance.
Public propertyServicesGets the container of default services associated with this instance.
Public propertyVirtualPathRootGets the root virtual path.
Top

  NameDescription
Public methodDispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.
Public methodEnsureInitializedInvoke the Intializer hook. It is considered immutable from this point forward. It's safe to call this multiple times.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAddODataQueryFilter()Overloaded. Enables query support for actions with an IQueryable or IQueryable(T) return type. To avoid processing unexpected or malicious queries, use the validation settings on EnableQueryAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. (Defined by HttpConfigurationExtensions.)
Public Extension MethodAddODataQueryFilter()Overloaded. Enables query support for actions with an IQueryable or IQueryable(T) return type. To avoid processing unexpected or malicious queries, use the validation settings on EnableQueryAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. (Defined by HttpConfigurationExtensions.)
Public Extension MethodAddODataQueryFilter(IActionFilter)Overloaded. Enables query support for actions with an IQueryable or IQueryable(T) return type. To avoid processing unexpected or malicious queries, use the validation settings on EnableQueryAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. (Defined by HttpConfigurationExtensions.)
Public Extension MethodAddODataQueryFilter(IActionFilter)Overloaded. Enables query support for actions with an IQueryable or IQueryable(T) return type. To avoid processing unexpected or malicious queries, use the validation settings on EnableQueryAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. (Defined by HttpConfigurationExtensions.)
Public Extension MethodBindParameter (Defined by HttpConfigurationExtensions.)
Public Extension MethodEnableCors()Overloaded. Enables the support for CORS. (Defined by CorsHttpConfigurationExtensions.)
Public Extension MethodEnableCors(ICorsPolicyProvider)Overloaded. Enables the support for CORS. (Defined by CorsHttpConfigurationExtensions.)
Public Extension MethodEnableQuerySupport()Overloaded. Enables query support for actions with an IQueryable or IQueryable(T) return type. To avoid processing unexpected or malicious queries, use the validation settings on EnableQueryAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. (Defined by ODataHttpConfigurationExtensions.)
Public Extension MethodEnableQuerySupport(IActionFilter)Overloaded. Enables query support for actions with an IQueryable or IQueryable(T) return type. To avoid processing unexpected or malicious queries, use the validation settings on EnableQueryAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. (Defined by ODataHttpConfigurationExtensions.)
Public Extension MethodEnableSystemDiagnosticsTracingCreates and registers an ITraceWriter implementation to use for this application. (Defined by HttpConfigurationTracingExtensions.)
Public Extension MethodGetCorsEngineGets the ICorsEngine from the HttpConfiguration. (Defined by CorsHttpConfigurationExtensions.)
Public Extension MethodGetCorsPolicyProviderFactoryGets the ICorsPolicyProviderFactory from the HttpConfiguration. (Defined by CorsHttpConfigurationExtensions.)
Public Extension MethodGetETagHandlerGets the IETagHandler from the configuration. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapHttpAttributeRoutes()Overloaded. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapHttpAttributeRoutes(IDirectRouteProvider)Overloaded. Maps the attribute-defined routes for the application. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapHttpAttributeRoutes(IInlineConstraintResolver)Overloaded. Maps the attribute-defined routes for the application. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapHttpAttributeRoutes(IInlineConstraintResolver, IDirectRouteProvider)Overloaded. Maps the attribute-defined routes for the application. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapODataServiceRoute(String, String, IEdmModel)Overloaded. Maps the specified OData route and the OData route attributes. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapODataServiceRoute(String, String, IEdmModel, ODataBatchHandler)Overloaded. Maps the specified OData route and the OData route attributes. When the batchHandler is non- null, it will create a '$batch' endpoint to handle the batch requests. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapODataServiceRoute(String, String, IEdmModel, HttpMessageHandler)Overloaded. Maps the specified OData route and the OData route attributes. When the defaultHandler is non- null, it will map it as the default handler for the route. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapODataServiceRoute(String, String, IEdmModel, IODataPathHandler, IEnumerable(IODataRoutingConvention))Overloaded. Maps the specified OData route. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapODataServiceRoute(String, String, IEdmModel, IODataPathHandler, IEnumerable(IODataRoutingConvention), ODataBatchHandler)Overloaded. Maps the specified OData route. When the batchHandler is non- null, it will create a '$batch' endpoint to handle the batch requests. (Defined by HttpConfigurationExtensions.)
Public Extension MethodMapODataServiceRoute(String, String, IEdmModel, IODataPathHandler, IEnumerable(IODataRoutingConvention), HttpMessageHandler)Overloaded. Maps the specified OData route. When the defaultHandler is non- null, it will map it as the handler for the route. (Defined by HttpConfigurationExtensions.)
Public Extension MethodSetCorsEngineSets the ICorsEngine on the HttpConfiguration. (Defined by CorsHttpConfigurationExtensions.)
Public Extension MethodSetCorsPolicyProviderFactorySets the ICorsPolicyProviderFactory on the HttpConfiguration. (Defined by CorsHttpConfigurationExtensions.)
Public Extension MethodSetETagHandlerSets the IETagHandler on the configuration. (Defined by HttpConfigurationExtensions.)
Public Extension MethodSuppressDefaultHostAuthenticationEnables suppression of the host's default authentication. (Defined by OwinHttpConfigurationExtensions.)
Public Extension MethodSuppressHostPrincipal (Defined by HttpConfigurationExtensions.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft