Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "junelee"

"HttpResponseException: Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details.\r\nSTACK TRACE: 在 System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable1 formatters, IFormatterLogger formatterLogger, CancellationToken cancellationToken)\r\n 在 System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(HttpRequestMessage request, Type type, IEnumerable1 formatters, IFormatterLogger formatterLogger)\r\n 在 System.Web.Http.ModelBinding.FormatterParameterBinding.d__0.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n 在 System.Web.Http.Controllers.HttpActionBinding.d__0.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n 在 System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n 在 System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext()\r\n

this is the post info

POST /api/services/app/Role/test HTTP/1.1 Host: localhost:61754 Cache-Control: no-cache

----WebKitFormBoundaryE19zNvXGzXaLvS5C Content-Disposition: form-data; name="Name"

test ----WebKitFormBoundaryE19zNvXGzXaLvS5C

this is my service:

public interface IRoleAppService : IApplicationService
    {
        List<TestDto> Test(TestInputDto name);
    }

public class RoleAppService : TravellerAppServiceBase, IRoleAppService
    {
        public List<TestDto> Test(TestInputDto input)
        {
            return new List<TestDto> {new TestDto {Id = 1, Name = input.Name}};
        }
    }

this is the dto

public class TestInputDto : EntityRequestInput
    {
        public string Name { get; set; }
    }
     public class TestDto:EntityDto
    {
        public string Name { get; set; }
    }

when i use this dynamic web api, an error occurred. { "success": false, "result": null, "error": { "code": 0, "message": "对不起,在处理您的请求期间,产生了一个服务器内部错误!(Sorry, during the processing of your request, a server internal error has occurred!)", "details": null, "validationErrors": null }, "unAuthorizedRequest": false }

Can you help me to fix it? thx

Showing 1 to 3 of 3 entries