title: SignalR sharing connection between 2 apps
body: <p>I have 2 projects in a solution, one is MVC app and the second one is simple Windows Forms app. What I'm currently trying to do, for testing purposes, is to control content on my MVC app through Windows Forms app. To simplify this further, I have a button on my app, which should, when clicked, update HTML on my connected clients. So MVC should manage client connections, and Forms app should be dedicated to content administration.</p>
  
  <p>What I did is this - MVC hub setup</p>
  
  <pre><code>public class ConnectionHub : Hub
  {
      public void Update()
      {
          Clients.All.updatesequence(" ");
      }
  }
  </code></pre>
  
  <p>MVC Startup setup:</p>
  
  <pre><code>[assembly: OwinStartup(typeof(Web.Startup))]
  
  namespace Web
  {
      public class Startup
      {
          public void Configuration(IAppBuilder app)
          {      
              GlobalHost.DependencyResolver.UseSqlServer(
          ConfigurationManager.ConnectionStrings["signalr"].ConnectionString);
              app.MapSignalR();
          }
      }
  }
  </code></pre>
  
  <p>Forms app - on button clicked event:</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
   {
          var context = GlobalHost.ConnectionManager.GetHubContext&lt;ConnectionHub&gt;();
          context.Clients.All.updatesequence(" ");
   }
  </code></pre>
  
  <p>Javascript client function "updatesequence()" should be ok because I tested it in different setups and it worked. Database connection also works.</p>
  
  <p>EDIT: my question is - how to make this work? It doesn't work in current setup. Context in Forms is loaded and "updatesequence" method is called, but nothing happens.</p>