【发布时间】:2015-12-18 20:17:43
【问题描述】:
我的代码
public async Task<IHttpActionResult> Post(long? Workrequestid, string fileexist){ throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound,"this item does not exist"));}
错误我越来越喜欢
{ "message": "Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details."
}
据我所知,我需要“此项目已存在”之类的消息。请帮帮我
【问题讨论】:
-
您正在抛出异常,并得到异常。多么令人费解!代码完全按照您所说的做!你能edit解释一下这有什么意外吗?
-
为什么“此项目不存在”的消息没有出现
-
您确定以正确的方式调用服务吗?你可以发布你的电话吗?
标签: c# asp.net-web-api