This is the first time I am creating a Web API application in ASP.NET MVC4. I opened a new Web API project and added a new controller named \'Product\'. The function given below
FYI I was getting the same issue when using .NET Core 3.1.
The solution was to use IActionResult instead of IHttpActionResult.
IActionResult
IHttpActionResult