SignalR server to client method not working
<p>Based on various resources the <code>signalr</code> code should be working, but I can't make it to send notifications from the server to client. Here is html/javascript part:</p>

<pre><code>&lt;script src="/Scripts/jquery-1.6.4.min.js"&gt;&lt;/script&gt;
&lt;script src="/Scripts/jquery.signalR-2.2.1.min.js"&gt;&lt;/script&gt;
&lt;script src="/signalr/js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;
    $(function () {
        var cHub = $.connection.cHub;

        $.connection.hub.logging = true;

        cHub.client.sendMessage = function (content) {
            $("#container-hub").append($("&lt;p /&gt;").html(content));
        };

        $.connection.hub.start().done(function() {
            $('[id$=bGo]').click(
                    function() {
                        cHub.server.send('Sync process started');
                    });
        });        
    });
&lt;/script&gt;
&lt;div id="container-hub" style="background: red; height: 100px; width: 100%;"&gt;&lt;/div&gt;
</code></pre>

<p>Hub.cs class:</p>

<pre><code>using Microsoft.AspNet.SignalR;

namespace CMS.Objects
{
    public class CHub : Hub
    {
        public void Send(string message)
        {
            // Call the broadcastMessage method to update clients.
            Clients.All.sendMessage(message);
        }
    }
}
</code></pre>

<p>Startup.cs class:</p>

<pre><code>using Microsoft.Owin;
using Owin;

[assembly: OwinStartup(typeof(CMS.CStartup))]

namespace CMS
{
    public class CStartup
    {
        public void Configuration(IAppBuilder app)
        {
            app.MapSignalR();            
        }
    }
}
</code></pre>

<p>And here is how I am calling the method <code>sendMessage</code> method:</p>

<pre><code>private void ShowMessage(string message)
{       
    var clients = GlobalHost.ConnectionManager.GetHubContext&lt;CHub&gt;().Clients;
    clients.All.sendMessage(message);
}
</code></pre>

<p>When the button <code>bGo</code> is clicked the message is getting appended to the <code>container-hub</code> div, but nothing when I call <code>sendMessage</code> method.</p>

<p><strong>EDIT</strong></p>

<p>Some additional findings; when I call <code>sendMessage</code> from within the <code>OnConnected</code> method it works:</p>

<pre><code>public override Task OnConnected()
{
    Clients.All.sendMessage("Connection Initialised");
    return base.OnConnected();
}
</code></pre>