public static void Register(HttpConfiguration config) { // Web API configuration and services // Web API routes config.MapHttpAttributeRoutes(); config.Formatters.Clear(); var xmlFormatter = new NoXmlnsXmlMediaTypeFormatter(); config.Formatters.Add(xmlFormatter); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); }