epitka
epitka

Reputation: 17627

ServiceStack: How to handle SerializationException?

I am getting SerializationException for the type, but I have no idea what is wrong with a request. How can one get more info, where the issue is? This is a stack trace:

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)

Upvotes: 1

Views: 309

Answers (1)

epitka
epitka

Reputation: 17627

I added logging using NLog, could not use Log4Net due to version conflict between NHibernate and ServiceStack log4net adapter (binding redirect did not work either). Anyway, although there is a logging in StringMapTypeDeserializer, it was not sufficient to pinpoint the problem. I checked out the code for service stack and added some additional logging and I was able to find the offending type.

Upvotes: 1

Related Questions