【发布时间】:2014-03-19 12:59:11
【问题描述】:
我有一个 RequestDto,它接受一个 int 参数
[Route("/club/thread/{Id}","GET")]
public MyDto{
[Apimember(DataType="int32")]
public int Id{get;set;}
}
当我输入http://myservice/club/thread/aaa.json时,抛出异常:
[RequestBindingException: 无法绑定请求]
ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq, IRestPath restPath) +538
ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName) +1023
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
AppHost.ExceptionHandler 无法捕捉到这个异常,如何捕捉它?
【问题讨论】:
标签: servicestack