3
List<int>
을 제외한 모든 속성을 채울 때마다 작동하는 매우 간단한 요청 DTO가 있습니다.ServiceStack 요청시 열거 가능할 때 입력 문자열의 형식이 올바르지 않음
오류 코드 :
'((ServiceStack.ServiceClient.Web.WebServiceException)($exception)).ErrorCode' threw an exception of type 'System.IndexOutOfRangeException'
으로 ErrorMessage :
'((ServiceStack.ServiceClient.Web.WebServiceException)($exception)).ErrorMessage' threw an exception of type 'System.IndexOutOfRangeException'
위한 responseBody :
"ResponseStatus":{
"ErrorCode":"SerializationException",
"Message":"KeyValueDataContractDeserializer: Error converting to type: Input string was not in a correct format.",
"StackTrace":" at ServiceStack.ServiceModel.Serialization.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs) in C:\\src\\ServiceStack\\src\\ServiceStack.Common\\ServiceModel\\Serialization\\StringMapTypeDeserializer.cs:line 108
at ServiceStack.ServiceHost.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance) in C:\\src\\ServiceStack\\src\\ServiceStack\\ServiceHost\\RestPath.cs:line 331
at ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq, IRestPath restPath) in C:\\src\\ServiceStack\\src\\ServiceStack\\WebHost.Endpoints\\RestHandler.cs:line 106
at ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName) in C:\\src\\ServiceStack\\src\\ServiceStack\\WebHost.Endpoints\\RestHandler.cs:line 62"
}
나는 또한 배열을 시도, 나도 같은 오류가
나는 이것을 어떻게 처리해야할지 모르겠다. 충돌을 일으키는 int의 간단한 목록입니다. 속성을 비워두고 다른 문자열이나 int를 DTO에 사용하면 잘 작동합니다. ServiceStack이이 문제를 처리 할 수 있어야합니다. 나는 ServiceStack의 3.9 버전입니다.
//DTO
Route("/employee")]
public class EmployeeSearch: IReturn<List<Employee>>
{
public string FirstNameEquals { get; set; }
public string LastNameEquals { get; set; }
...
public int[] InDepartment { get; set; }
}
...
//Request
//SearchCriteria is of the above type
result.Employees = _client.Get(result.SearchCriteria);
자신의 답변을 수락 한 것으로 표시 할 수 있습니다. 감사! – ean5533
2 일 동안 ... – Tyrsius