signalR - web socket connectionData: [] after connection start in ASP.Net MVC

Refresh

2 weeks ago

Views

5 time

0

My current application has an online voting process this was previously build feature using signalR older version - 1.1.4

& that online feature working perfectly in older version

but later we did some .net version upgrade and we decide to upgrade signalR too. so we upgraded it to 2.0.3

to do this I have to add Startup.cs class too.

Sample code

 $(function () {
    debugger;
    var notificationHub = $.connection.NotificationHub;
    $.connection.hub.start().done(function () {
        $('.btnSaveRecommendation').on('click', function (e) {
            var agendaGroupItemId = e.delegateTarget.id;
            notificationHub.server.sendMeetingAgendaGroupItemRecommendedActionReplace('@Model.Organization', '@Model.MeetingId', agendaGroupItemId);
        });
    }).fail(function (error) {
        alert("Failed to connect!");
    });;
});

enter image description here enter image description here enter image description here enter image description here JavaScript Web References

I still cannot figure it out why this happening. to identify this issue i have been created another project using signalR 2.0.3 & its working perfectly enter image description here enter image description here enter image description here

I have added images then i believe you can get good idea about it. can you please help me to fix this issue?

TDM

0 answers