
Untitled
By: a guest on
Aug 10th, 2012 | syntax:
None | size: 0.56 KB | hits: 8 | expires: Never
SignalR and 500 Errors
public bool AddThing(Thing thing)
{
// add and notify client
}
public class Thing {
public Double Foo { get; set; }
}
{"hub":"ThingHub","method":"AddThing","args":[{"Foo":"bar"}],"state":{},"id":1}
$.connection.hub.error(function() {
console.log('An error occurred...');
});
public bool AddThing(Thing thing)
{
return true;
}
public class Thing
{
public Double Foo { get; set; }
}
myHub.addThing({"Foo":"Bar"});
myHub.someMethod()
.done(function(result) {
})
.fail(function(error) {
});