You can use IControllerConfiguration
to define per-controller specific configuration..
This is a sample which describes this scenario. You can quickly take a look at how this interface should be used over here(from the sample).
An example of a custom configuration is:
public class CustomControllerConfigAttribute : Attribute, IControllerConfiguration
{
public void Initialize(HttpControllerSettings controllerSettings,
HttpControllerDescriptor controllerDescriptor)
{
// Register an additional plain text media type formatter
controllerSettings.Formatters.Add(new PlainTextBufferedFormatter());
}
}
The source for PlainTextBufferedFormatter
if you're curious.