I am using a WinRT client. I receive this exception when I try to send a message.
Unexpected character encountered while parsing value: <.
The problem occurs when you send an object to the hub, and the object is not defined on the hub. The object is a Bindable object (ViewModel). I don't want to include all the property notify change stuff on the web project.
Client Code
return Proxy.Invoke("PlayerUpdate", sessionData);
Try one was to have the hub accept an 'object' parameter
public async Task PlayerUpdate(string group, object sessionData)
{
await Clients[group].PlayerUpdate(sessionData);
}
Try two was to have the hub accept an (json) 'string' parameter
public async Task PlayerUpdate(string group, string sessionData)
{
await Clients[group].PlayerUpdate(sessionData);
}
Try three was to pre-serialize the object client side
var str = JsonConvert.SerializeObject(refresh);
return Proxy.Invoke("PlayerUpdate", str);
Nothing is working. Plan 4 is to define some data transfer objects in a shared libarary to send. I really dont want to do that as It will about double my code.