Web API错误请求删除消息详细信息

时间:2018-06-27 06:01:42

标签: http asp.net-web-api

当尝试使用错误的参数导航到URL时,出现以下消息:

{"Message":"No HTTP resource was found that matches the request URI 'http://localhost:18988/api/mycontroller?a=3&b=3&'.","MessageDetail":"No action was found on the controller 'mycontroller' that matches the request."}

如何删除此回复的MessageDetail部分,使其仅显示{"Message":"No HTTP resource was found that matches the request URI 'http://localhost:18988/api/mycontroller?a=3&b=3&'."}

0 个答案:

没有答案