When i am hitting the url: http://localhost/api/adxxx/getDeals/?input=2
I get the following error:
"Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/adxxx/getDeals/?input=2'.",
"MessageDetail": "No type was found that matches the controller named 'adxxx'."
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.DependencyResolver = new UnityResolver(UnityBootstrapper.Initialise());
config.EnableCors();
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "xxx.services",
routeTemplate: "webapi/{controller}/{action}"
);
config.Routes.MapHttpRoute(
name: "xxx.services_new",
routeTemplate: "api/{controller}/{action}",
defaults: new { id = RouteParameter.Optional }
);
FluentValidationModelValidatorProvider.Configure(config);
}
}
[Route("api/adxxx/getDeals/")]
public IHttpActionResult GetDeals(int input)
{
//code here
}
How do i resolve this? Very similar apis having different route are working fine.
This happened when i have added fluent validation to my api. That updated my System.Web.Http.dll to v5.2.3.0