Created
February 17, 2012 03:11
-
-
Save pedroreys/1850239 to your computer and use it in GitHub Desktop.
web API Message Handler configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_Start() | |
{ | |
//Default Registration and configuration stuff | |
AreaRegistration.RegisterAllAreas(); | |
RegisterGlobalFilters(GlobalFilters.Filters); | |
RegisterRoutes(RouteTable.Routes); | |
BundleTable.Bundles.RegisterTemplateBundles(); | |
//Call to a Configure method created to add message handlers to the Request pipeline | |
Configure(GlobalConfiguration.Configuration); | |
} | |
static void Configure(HttpConfiguration configuration) | |
{ | |
configuration.MessageHandlers.Add(new NotAcceptableConnegHandler()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment