title: SignalR - Unable to load hub method
body: <p>I am interested in using SignalR to provide a better user experience for some long-running processes in my application and have just created my first test SignalR project.  I created an empty web project and then used NuGet to install the SignalR.Sample package.  The StockTicker.html page example works perfectly.  I then created my own Hub and test page.</p>
  
  <pre><code>using System.Threading;
  using Microsoft.AspNet.SignalR.Hubs;
  
  namespace SignalR.Test
  {
     [HubName("testHub")]
     public class TestHub : Hub
     {
        public void LongRunningProcess()
        {
           Thread.Sleep(1000);
           this.Clients.Caller.updateStatus("25% Completed");
           Thread.Sleep(1000);
           this.Clients.Caller.updateStatus("50% Completed");
           Thread.Sleep(1000);
           this.Clients.Caller.updateStatus("75% Completed");
           Thread.Sleep(1000);
           this.Clients.Caller.updateStatus("Done");
        }
     }
  }
  
  
  &lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
     &lt;title&gt;SignalR - Long Running Process&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;h1&gt;Long Running Process&lt;/h1&gt;
  
     &lt;p&gt;Status:&lt;/p&gt;
  
     &lt;ul id="status"&gt;
        &lt;li&gt;Loading hub...&lt;/li&gt;
     &lt;/ul&gt;
  
     &lt;script src="/bundles/jquery"&gt;&lt;/script&gt;
     &lt;script src="/Scripts/jquery.signalR-1.0.0-alpha2.js"&gt;&lt;/script&gt;
     &lt;script src="/signalr/hubs"&gt;&lt;/script&gt;
     &lt;script type="text/javascript"&gt;
        $(function () {
           var hub = $.connection.testHub;
  
           hub.updateStatus = function (message) {
              $("#status").append("&lt;li&gt;" + message + "&lt;/li&gt;");
           };
  
           $.connection.hub.start().done(function () {
              $("#status").children().first().text("Hub loaded.");
              hub.longRunningProcess();
           })
           .fail(function() {
              $("#status").children().first().text("Hub failed");
           });
        })
     &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run the page, I get the following (Firebug) error:</p>
  
  <pre><code>TypeError: hub.longRunningProcess is not a function
      hub.longRunningProcess();
  </code></pre>
  
  <p>If I look in /signalr/hubs I see the following script towards the end of the file:</p>
  
  <pre><code>signalR.testHub = signalR.hub.createHubProxy('testHub'); 
  signalR.testHub.client = { };
  signalR.testHub.server = {
      longRunningProcess: function () {
          return signalR.testHub.invoke.apply(signalR.testHub, $.merge(["LongRunningProcess"], $.makeArray(arguments)));
       }
  };
  </code></pre>
  
  <p>Any advice/pointers on where I'm going wrong would be much appreciated.</p>