title: JavaScript connection not starting and function not executing on a JQuery and SignalR web form application
body: <p>I have a ASP.NET chat application. Using JavaScript, Jquery and Signalr. However my connection does not start to post the message. The browser does prompt me to enter my alias however when l write my message. It does not post it. <a href="https://i.stack.imgur.com/Loqtl.png" rel="nofollow noreferrer">This is a snippet of the error</a></p>
  
  <p>C# class :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using Microsoft.AspNet.SignalR;
  using Microsoft.AspNet.SignalR.Hubs;
  
  namespace Synergince
  {
     [HubName("chatHub")]
  public class ChatHub : Hub
  {
  
      public void Send(string name, string message)
      {
  
          Clients.All.broadcastMessage(name, message);
      }
  
  }
  }
  </code></pre>
  
  <p>JavaScript code : </p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;input type="text" id="message" /&gt;
  &lt;input type="button" id="sendmessage" value="Send" /&gt;
  &lt;input type="hidden"id="displayname" /&gt;
  &lt;ul id="discussion"&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  
      //Script references
  &lt;script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript" src="Scripts/jquery.signalR-1.2.1.js"&gt;
  &lt;/script&gt;
  &lt;script src='&lt;%: ResolveClientUrl("~/signalr/hubs") %&gt;'&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
              //declare a proxy to reference the hub
              var chat = $.connection.chatHub;
  
              //function for the hub to call to broadcast messages
              chat.client.broadcastMessage = function (name, message) {
                  $('#discussion').append('&lt;li&gt;&lt;strong&gt;' + name + '&lt;/strong&gt;:&amp;nbsp;&amp;nbsp;' + message + '&lt;/li&gt;');
              };
  
              //Get the user name and store it to prepend to messages
              $('#displayname').val(prompt('Enter preferred alias:', ''));
  
              //initial focus on textbox
              $('#message').focus();
  
              //connection start
              $.connection.hub.start().done(function () {
                  $('#sendmessage').click(function () {
                      var Name = $('&lt;div /&gt;').text($('#displayname').val()).html();
                      var Msg = $('&lt;div /&gt;').text($('#message').val()).html();
  
                      //call send method to hub
                      chat.server.send(Name, Msg);
  
                      //clear textbox and set for next input
                      $('#message').val('').focus();
  
                  });
  
              });
  
          });
     &lt;/script&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Browser debugger error is: </p>
  
  <blockquote>
    <p>Uncaught TypeError: $.Deferred is not a function</p>
  </blockquote>
  
  <p>To this line :</p>
  
  <pre><code> $.connection.hub.start().done(function () {
  </code></pre>