我有一个webapi控制器,当我通过邮递员或什至通过浏览器点击它时,对于不存在的操作,它会返回一个JSON
{
"message": "No HTTP resource was found that matches the request URI' http://localhost:65000/api/somecontroller/getsomething'.",
"messageDetail": "No action was found on the controller 'somecontroller' that matches the name 'getsomething'."
}
如何避免返回此有效负载或URL反射。请提出任何建议?
谢谢