Share via


HttpConfiguration Class

Configuration of HttpServer instances.

Inheritance Hierarchy

System.Object
  System.Web.Http.HttpConfiguration
    System.Web.Http.SelfHost.HttpSelfHostConfiguration

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

Syntax

'Declaration
Public Class HttpConfiguration _
    Implements IDisposable
'Usage
Dim instance As HttpConfiguration
public class HttpConfiguration : IDisposable
public ref class HttpConfiguration : IDisposable
type HttpConfiguration =  
    class
        interface IDisposable
    end
public class HttpConfiguration implements IDisposable

The HttpConfiguration type exposes the following members.

Constructors

  Name Description
Public method HttpConfiguration() Initializes a new instance of the HttpConfiguration class.
Public method HttpConfiguration(HttpRouteCollection) Initializes a new instance of the HttpConfiguration class with an HTTP route collection.

Top

Properties

  Name Description
Public property DependencyResolver Gets or sets the dependency resolver associated with thisinstance.
Public property Filters Gets the list of filters that apply to all requests served using this HttpConfiguration instance.
Public property Formatters Gets the media-type formatters for this instance.
Public property IncludeErrorDetailPolicy Gets or sets a value indicating whether error details should be included in error messages.
Public property Initializer Gets or sets the action that will perform final initialization of the HttpConfiguration instance before it is used to process requests.
Public property MessageHandlers Gets 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 property ParameterBindingRules The collection of rules for how parameters should be bound.
Public property Properties Gets the properties associated with this instance.
Public property Routes Gets the HttpRouteCollection associated with this HttpConfiguration instance.
Public property Services Gets the container of default services associated with this instance.
Public property VirtualPathRoot Gets the root virtual path.

Top

Methods

  Name Description
Public method Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected method Dispose(Boolean) Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Extension Methods

  Name Description
Public Extension Method BindParameter Register that the given parameter type on an Action is to be bound using the model binder. (Defined by HttpConfigurationExtensions.)

Top

Thread Safety

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

See Also

Reference

System.Web.Http Namespace