I am using Aspnet webapi2. I want to register a message handler based on the environment. can you please let me know how can i configure the same based on environment.
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
if (Env.Equals("Live"))
{
config.MessageHandlers.Add(new NotAcceptableConnegHandler());
}
}
}