It is possible due to using MVC controller instead of Web API controller. Check the namespace in Web API controller it should be as following
using System.Net; using System.Net.Http; using System.Web.Http; using System.Net; using System.Net.Http; using System.Web.Http; If the namespace are as following then it is give above error in web api controller method calling
using System.Web; using System.Web.Mvc; using System.Web; using System.Web.Mvc;