Pretty simple object… code below the stack here, why is GetDbConnection being called!!! Using 4.0.62 also tried older version 4.0.4x
at ServiceStack.ServiceStackHost.GetDbConnection (IRequest req) [0x00085] in :0
at ServiceStack.Service.get_Db () [0x00016] in :0
at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,ShipNow.Common.UIMessage)
at ServiceStack.Text.Common.WriteType2[T,TSerializer].WriteProperties (System.IO.TextWriter writer, System.Object value) [0x0013e] in <filename unknown>:0 at ServiceStack.Text.Json.JsonWriter
1[T].WriteRootObject (System.IO.TextWriter writer, System.Object value) [0x0000b] in :0
at ServiceStack.Text.JsonSerializer.SerializeToString[T] (ServiceStack.Text.T value) [0x000c8] in :0
at ShipNow.Common.UIMessage.toJson () [0x00003] in /Users/kevin/Projects/ShipNow/ShipNow.Common/UIMessage.cs:66
using System;
using ServiceStack;
using ServiceStack.Text;
namespace ShipNow.Common
{
public class UIMessage : Service
{
private IServerEvents ServerEvents { get; set; }
public bool successfull { get; set; }
public string message { get; set; }
public string objectData { get; set; }
private string _channel { get; set; }
private string _selector { get; set;}
public UIMessage()
{
}
public UIMessage(string channel, string selector, bool success, string _message, Object objData)
{
successfull = success;
message = message;
_channel = channel;
_selector = selector;
if (objData != null)
{
try
{
objectData = JsonSerializer.SerializeToString(objData);
}
catch (Exception e)
{
Util.ServiceLog.Error("Error serializing object for UIMEssage", e);
}
}
}
public void notify()
{
if (!_channel.IsNullOrEmpty() && !_selector.IsNullOrEmpty())
{
ServerEvents.NotifyChannel(_channel, _selector, this.toJson());
}
else {
Util.ServiceLog.Warn("TRied to notify without a channel/selector");
}
}
public string toJson()
{
try
{
return JsonSerializer.SerializeToString(this);
}
catch (Exception e)
{
Util.ServiceLog.Error("Error serializing object for UIMEssage", e);
return "{\"message\":\"error serializing\"}";
}
//return JsonSerializer.SerializeToString(this);
}
}
}