I just upgraded to SignalR 1.0.0-Alpha2. After i did it, I can not debug my hub methods. It never reaches to the breakpoint.
here is code
Reference:
<script src="../../Scripts/jquery.signalR-1.0.0-alpha2.min.js" type="text/javascript"></script>
<script src="<%:Url.Content("~/signalr/hubs")%>" type="text/javascript"></script>
Client:
$(document).ready(function () {
con = $.connection.messagingHub;
$.connection.hub.start(function () {
var myClientId = $.connection.hub.id;
con.connectToHub('<%:ViewBag.rid%>', myClientId); // Breakpoint never reaches to this method on the hub.
con.getWaitingOrdersCount('<%:ViewBag.rid%>').done(function (data) {
console.log(data);
});
});
Hub code:
public void ConnectToHub(Int32 rId, string connectionId)
{
var res = new HubConnection();
res.ConnectionId = connectionId;
res.RestaurantId = rId;
dc.HubConnection.AddObject(res);
dc.SaveChanges();
}
what may went wrong?? any help??
EDIT:
firebug says:
TypeError: con is undefined
con.connectToHub('36', myClientId);