Skip to content

Configuring Your Application

Chris Martinez edited this page Jul 28, 2016 · 6 revisions

Although different variations of ASP.NET have different application initialization methods, careful consideration was taken to make the API configuration as similar as possible across all applications.

ASP.NET Web API

The configuration for ASP.NET Web API applications typically occurs in the Register method of the WebApiConfig.cs file. To enable API versioning support with the default options, use the following configuration:

public static void Register( HttpConfiguration configuration )
{
    configuration.AddApiVersioning();
    // remaining web api setup omitted for brevity
}
Clone this wiki locally