title: $.hubConnection is not a function(…)
body: <p>I ran into a problem with my SignalR project. I have created an console to run the SignalR and then trying to use it with my website (all running in localhost mode for now)</p>
  
  <p><strong>SignalRSelfHost</strong></p>
  
  <pre><code>using System;
  using Microsoft.AspNet.SignalR;
  using Microsoft.Owin.Hosting;
  using Owin;
  using Microsoft.Owin.Cors;
  using Microsoft.AspNet.SignalR.Hubs;
  
  namespace SignalRSelfHost
  {
      class Program
      {
          static void Main(string[] args)
          {
              // This will *ONLY* bind to localhost, if you want to bind to all addresses
              // use http://*:8080 to bind to all addresses. 
              // See http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx 
              // for more information.
              string url = "http://localhost:8080";
              using (WebApp.Start(url))
              {
                  Console.WriteLine("Server running on {0}", url);
                  Console.ReadLine();
              }
          }
      }
      class Startup
      {
          public void Configuration(IAppBuilder app)
          {
              app.UseCors(CorsOptions.AllowAll);
              app.MapSignalR();
          }
      }
      [HubName("myHub")]
      public class MyHub : Hub
      {
          public void Send(string name, string message)
          {
              Clients.All.addMessage(name, message);
          }
      }
  }
  </code></pre>
  
  <p><strong>Index.Html</strong></p>
  
  <pre><code>&lt;script src="Scripts/jquery-3.1.1.min.js"&gt;&lt;/script&gt;
  
  &lt;script src="Scripts/jquery.signalR-2.2.1.min.js"&gt;&lt;/script&gt;
  
  &lt;script src="http://localhost:8080/signalr/hubs"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(function () {
          //Set the hubs URL for the connection
          //$.connection.hub.url = "http://localhost:8080/signalr";
  
          //// Declare a proxy to reference the hub.
          //var chat = $.connection.myHub;
  
          var conn = $.hubConnection("http://localhost:8080/signalr");
          var hubProxy = conn.createHubProxy('myHub');
  
  
          conn.start().done(function () {
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Some of the above has been outcomented, because that is something i also tried but didnt work either.</p>
  
  <p>Can anyone tell me why i get the error: <strong>$.hubConnection is not a function(…)</strong></p>