【问题标题】:ServiceStack: How to handle SerializationException?ServiceStack:如何处理 SerializationException?
【发布时间】:2013-05-02 23:28:41
【问题描述】:

我收到该类型的 SerializationException,但我不知道请求有什么问题。如何获得更多信息,问题出在哪里?这是一个堆栈跟踪:

StackTrace=   at ServiceStack.ServiceModel.Serialization.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs)

   at ServiceStack.ServiceHost.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance)

   at ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq, IRestPath restPath)

   at ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName)

【问题讨论】:

    标签: servicestack


    【解决方案1】:

    我使用 NLog 添加了日志记录,由于 NHibernate 和 ServiceStack log4net 适配器之间的版本冲突而无法使用 Log4Net(绑定重定向也不起作用)。无论如何,虽然在 StringMapTypeDeserializer 中有一个日志记录,但这还不足以查明问题所在。我检查了服务堆栈的代码并添加了一些额外的日志记录,我能够找到有问题的类型。

    【讨论】:

      猜你喜欢
      • 2011-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多