title: Connecting Client Server in ASP.net MVC Signal R
body: <p>This is my Signal R Client.
  I get this error when i run my client.(0x800a139e - JavaScript runtime error: SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. .)</p>
  
  <p>The exception comes from line  $.connection.hub.start</p>
  
  <p>There is a ServerHub class in a folder HUBS in my Server application which runs fine.</p>
  
  <p>Can anyone help me out..
  Thanks</p>
  
  <pre><code>&lt;script src="~/Scripts/jquery.signalR-2.2.0.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://localhost:39670/MySignalRServer/signalr/hubs"&gt;&lt;/script&gt;
   var ChatHubProxy = $.hubConnection("http://localhost:39670/MySignalRServer/signalr/hubs");
          var chat = ChatHubProxy.createHubProxy('ServerHub');
  
      chat.on("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;');
          });
        $.connection.hub.start({jsonp:true}).done(function () {
              $('#sendmessage').click(function () {
                  // Call the Send method on the hub.
                  chat.server.send($('#displayname').val(),       $('#message').val());
                  alert("hiii");
                  // Clear text box and reset focus for next comment.
                  $('#message').val('').focus();
              });
          });
  </code></pre>