Encountering an issue with my signalr/hub while fetching dashboard data. I'm using 2 browsers to access data based on dates. However, when searching for July on browser 1 and then switching to another month on browser 2, the data in browser 1 gets updated as well.
C#.net MVC
public class DashBoardBroadcaster
{
private DashboardManager dashboardmanager = new DashboardManager();
private readonly static Lazy<DashBoardBroadcaster> _instance = new Lazy<DashBoardBroadcaster>(() => new DashBoardBroadcaster());
private readonly TimeSpan BroadcastInterval = TimeSpan.FromMilliseconds(10000);
// Other code...
}
[HubName("dashBoardHub")]
public class DashBoardHub : Hub
{
private DashBoardBroadcaster _broadcaster;
// Other code...
}
_Layout.chtml
<script>
$(document).ready(function () {
$.connection.hub.qs = { "Name": "value" };
$.connection.hub.start().done();
});
</script>
Index.chtml
<script>
$(document).ready(function () {
var dashBoardHub = $.connection.dashBoardHub;
// Other code...
});
</script>