I am using WCF data services to ‘query’ for data models from my web application, but then I use SignalR to receive ‘push’ updates.
WCF Data Services (OData) formats dates as a string in the format “/Date(1319493384779)/”. This is fine, because I then generate client-side (javascript) viewmodels where I create actual Javascript Date() objects.
SignalR also sends DateTime objects from the server to the client as “/Date(1319493384779)/”, but it appears to expect an actual Date() object when passing from javascript to a server hub method via Javascript.
This is rather inefficient, because I already have a model object in javascript, and I should just be able to send it to a SignalR hub as-is.
Does anybody have any idea why this is happening?
EDIT:
This is a message arriving in the browser from the server, note the format of the CreationDate – on the server this is a CLR DateTime

This is sending an object back to the Hub – notice the exact same date format… this call fails

This is the error

If I format the date like this, it works (Javascript code):
CreationDate: "13/10/2011 3:31:10 p.m."
Recognised issue listed on GITHub, now open.
https://github.com/SignalR/SignalR/issues/46