We are using a ASP app written by an outside vendor. I am tasked with making a small change to the app however I don\'t know anything about asp or json. Through some resea
Json in ApiController with two parameters has a signature of,
protected internal JsonResult<T> Json<T>(
T content,
JsonSerializerSettings serializerSettings
)
Json in Controller with two parameters has a signature of,
protected internal JsonResult Json(
object data,
JsonRequestBehavior behavior
)
getipaddressController inherited from ApiController, but you used Controller method Json. Use,
return new JsonResult()
{
Data = ipAddress,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
If you still want the behavior.