title: SignalR Error: signalR(...).starting(...).sending is not a function
body: <p>I'm learning basics of implementing SignalR from beside link <a href="http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc" rel="nofollow noreferrer">Asp.Net Signal MVC4</a>. Just like the tutorial suggested I have implemented a demo application but I am not able to resolve following error.</p>
  
  <blockquote>
    <p>Uncaught TypeError: signalR(...).starting(...).sending is not a
    function</p>
  </blockquote>
  
  <p>This is what I have tried so far.</p>
  
  <p><strong>Prerequisite:</strong></p>
  
  <ol>
  <li>Microsoft.AspNet.SignalR</li>
  <li>WebAPIDoodle.SignalR</li>
  </ol>
  
  <p><strong>Hub</strong></p>
  
  <pre><code>namespace SignalRChat.Hubs
  {        
      public class ChatHub : Hub
      {
          public void Send( string name, string message )
          {
              Clients.All.addNewMessageToPage( name, message );
          }
      }
  }
  </code></pre>
  
  <p><strong>Owin Startup</strong></p>
  
  <pre><code>[assembly: OwinStartup( typeof( SignalRChat.Startup ) )]
  
  namespace SignalRChat
  {
      public class Startup
      {
          public void Configuration( IAppBuilder app )
          {
              app.MapSignalR();
          }
      }
  }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public ActionResult Chat()
  {
      return View();
  }
  </code></pre>
  
  <p><strong>View (Chat)</strong></p>
  
  <pre><code>@{
      ViewBag.Title = "Chat";
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;h2&gt;Chat&lt;/h2&gt;
  &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;
  @section scripts {
      &lt;!--Script references. --&gt;
      &lt;!--The jQuery library is required and is referenced by default in _Layout.cshtml. --&gt;
      &lt;!--Reference the SignalR library. --&gt;
      @*&lt;script src="~/Scripts/jquery.signalR-2.1.0.min.js"&gt;&lt;/script&gt;*@
      &lt;script src="http://ajax.aspnetcdn.com/ajax/signalr/jquery.signalr-2.0.0.min.js"&gt;&lt;/script&gt;
      &lt;!--Reference the autogenerated SignalR hub script. --&gt;
      &lt;script src="~/signalr/hubs"&gt;&lt;/script&gt;
      &lt;!--SignalR script to update the chat page and send messages.--&gt;
      &lt;script type="text/javascript"&gt;
          $(function () {
  
              var connection = $.connection('/echo');
              console.log(connection);
              // Reference the auto-generated proxy for the hub.
              var chat = $.connection.chatHub;
              // Create a function that the hub can call back to display messages.
              chat.client.addNewMessageToPage = function (name, message) {
                  // Add the message to the page.
                  $('#discussion').append('&lt;li&gt;&lt;strong&gt;' + htmlEncode(name)
                      + '&lt;/strong&gt;: ' + htmlEncode(message) + '&lt;/li&gt;');
              };
              // Get the user name and store it to prepend to messages.
              $('#displayname').val(prompt('Enter your name:', ''));
              // Set initial focus to message input box.
              $('#message').focus();
              // Start the connection.
              $.connection.hub.start().done(function () {
                  $('#sendmessage').click(function () {
                      // Call the Send method on the hub.
                      chat.server.send($('#displayname').val(), $('#message').val());
                      // Clear text box and reset focus for next comment.
                      $('#message').val('').focus();
                  });
              });
          });
          // This optional function html-encodes messages for display in the page.
          function htmlEncode(value) {
              var encodedValue = $('&lt;div /&gt;').text(value).html();
              return encodedValue;
          }
      &lt;/script&gt;
  }
  </code></pre>
  
  <p>I not able to resolve following error. Is there anything I'm missing here because I have installed all required files and using latest Jquery. I tried using lower version of signalR but still same issue persist. </p>
  
  <p>Here, the snapshot of developer console with list of error.</p>
  
  <p><a href="https://i.stack.imgur.com/bTskn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bTskn.png" alt="enter image description here"></a></p>
  
  <p><strong>Source of error</strong></p>
  
  <p><a href="https://i.stack.imgur.com/zNqmP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zNqmP.png" alt="enter image description here"></a></p>