Hi,
I have upgraded service stack from 5.4 to 5.8 and in some projects its is upgraded to 5.8.1. After upgrading, I am getting following exception-
“ErrorCode”: “MissingMethodException”,
“Message”: “Method not found: ‘ServiceStack.ResponseStatus ServiceStack.DtoUtils.ToResponseStatus(System.Exception)’.”,
“StackTrace”: “System.MissingMethodException: Method not found: ‘ServiceStack.ResponseStatus ServiceStack.DtoUtils.ToResponseStatus(System.Exception)’.\r\n at ServiceStack.TaskExt.GetResult(Task task)\r\n at ServiceStack.Host.ServiceController.<>c__DisplayClass41_1.b__1(Task task)\r\n at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at ServiceStack.Host.ServiceController.d__49.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at ServiceStack.Host.RestHandler.d__14.MoveNext()\r\n”,
On debugging the code I found that, it was throwing error in following method-
public QueryResponse ExecuteQuery<T, TK>(QueryDb<T, TK> req, Dictionary<string, string> queryArgs = null, bool overrideRLS = false)
{
QueryResponse queryResponse = null;
SetSessionBeforeCall(Db, dbConnection =>
{
if(queryArgs == null) queryArgs = Request.GetRequestParams();
var q = AutoQuery.CreateQuery(req, queryArgs, Request);
queryResponse = new QueryResponse()
{
Offset = q.Offset.GetValueOrDefault(0),
Total = (int) dbConnection.Count(q),
Results = dbConnection.LoadSelect<TK, T>(q)
};
}, overrideRLS);
return queryResponse;
}
Further debugging to ServcieStack library, found error occurred in ServiceController at
//Executes the service and returns the result
response = serviceExec(request, requestDto);
Can you help me to resolve the issue ?