0
votes

I am getting error while i call start on SignalR connection object.

I am utilizing singalr functionality in a plain HTML page.

Below is the peace of code included in the page.

<script type="text/javascript" src="Scripts/jquery-1.6.4.js"></script>
<script type="text/javascript" src="Scripts/jquery.signalR-0.5.2.js"></script>
<script src='<%= ResolveClientUrl("~/signalr/hubs") %>'type="text/javascript"></script

var movieTicketHub = $.connection.movieTicketHub;

$( function () {

            $.connection.hub.start();
        }
    );

This is my hub

namespace MovieReservation

{ public class MovieTicketHub:Hub { public void BookTicket(string no, bool booked) { Clients.SendNotification(no, booked); } } }

Error Message: Unable to get value of the property 'start': object is null or undefined

1
did you include jquery twice on the page?davidfowl
No. its only included once in the page.Brainchild

1 Answers

0
votes

The problem is the way dynamic signalR javascript referred. below change solved my problem.

<script src="/signalr/hubs" type="text/javascript"></script>