I have two projects - one MVC and other Web Api. Both have one controller with the same name (DealsController).
It is working fine since we have specific route mentioned in all actions for Web Api deals controller.
Web api deals controller looks like:
public class DealsController : ApiController
{
[Route("api/advantage/getDeals/")]
public IHttpActionResult GetDeals([FromUri] CompanyName.Entity.Deals.Filters filter)
{
}
}
Both are working fine till the time i install package - Microsoft.AspNet.WebApi. Once i am installing this package in my project that has web api, this action starts giving me error.
{
"Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/advantage/getDeals/?cityId=10&sc=0&so=1&pn=1'.",
"MessageDetail": "No type was found that matches the controller named 'advantage'."
}