Hi,
I have a WebAPI in my MVC project configured like this in the WebApiConfig.cs
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
If I turn off i18n the api works like a charm.
When i18n is on (references loaded) whenever I go to /api/{controller}/{action}/{id} I get redirected to /{controller}/{action}/{id}
How can I override this redirect? Or even better how can I use i18n with the WebApi?
Hi, I have a WebAPI in my MVC project configured like this in the WebApiConfig.cs
If I turn off i18n the api works like a charm. When i18n is on (references loaded) whenever I go to /api/{controller}/{action}/{id} I get redirected to /{controller}/{action}/{id}
How can I override this redirect? Or even better how can I use i18n with the WebApi?
Thanks.