title: SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started
body: <p>Trying to replicate an example I have encountered the problem that the connection is not made, when it comes to do it from a server to my computer, but when I work remotely if it works.</p>
  
  <p>Links example</p>
  
  <p><a href="http://sravi-kiran.blogspot.com.co/2013/09/ABetterWayOfUsingAspNetSignalRWithAngularJs.html" rel="nofollow">link 1</a>
  <a href="http://sravi-kiran.blogspot.com.co/2013/05/HookingUpAspNetSignalRWithAngularJS.html" rel="nofollow">link 2</a></p>
  
  <p>This is my code</p>
  
  <pre><code>var app = angular.module('app', []);
  app.value('$', $);
  
  app.factory('signalRSvc', function ($, $rootScope) {
      return {
          proxy: null,
          initialize: function (acceptGreetCallback) {           
  
              //Getting the connection object
              connection = $.hubConnection('http://190.109.185.138:8016');         
  
              //Creating proxy
              this.proxy = connection.createHubProxy('HelloWorldHub');
  
              //Starting connection
              connection.start({ jsonp: true }).done(function () {
                  alert("funciono");
              });
  
              connection.start({ jsonp: true }).fail(function () {
                  alert("fallo");
              });
  
              //connection.start({ jsonp: true }).done(function () {
              //    console.log("connection started!");
              //});  
  
  
              //Attaching a callback to handle acceptGreet client call
              this.proxy.on('acceptGreet', function (message) {
                  $rootScope.$apply(function () {
                      acceptGreetCallback(message);
                  });
              });
          },
          sendRequest: function (callback) {
              //Invoking greetAll method defined in hub
              this.proxy.invoke('greetAll');
          }
      }
  });
  
  app.controller('SignalRAngularCtrl', function ($scope, signalRSvc) {
  
      $scope.text = "";
  
      $scope.greetAll = function () {
          signalRSvc.sendRequest();
      }
  
      updateGreetingMessage = function (text) {
          $scope.text = text;
      }
  
      signalRSvc.initialize(updateGreetingMessage);
  
  });
  </code></pre>