title: ASP.NET SignalR C# Client App Exception on Start
body: <p>I have a ASP.NET application. I run it by hitting debug. It runs on localhost:2842.</p>
  
  <p>I have a SignalR Hub defined in a class with no methods on the server.</p>
  
  <p>I have a WPF Windows C# application. I added the SignalR NuGet package. I use the following code to instantiate the client proxy:</p>
  
  <pre><code>        var hubConnection = new HubConnection("http://localhost:2842");
  
          IHubProxy myHubProxy = hubConnection.CreateHubProxy("MyHub");
          myHubProxy.On&lt;string&gt;("SendMeData", dataString =&gt; {
  
              Console.WriteLine("String value {0}", dataString);
          });
  
          hubConnection.Start().Wait();
  </code></pre>
  
  <p>Here is my hub class defined on the server:</p>
  
  <pre><code>public class MyHub : Hub
  {
      public static void SendMeData(string dataString)
      {
          var context = GlobalHost.ConnectionManager.GetHubContext&lt;MyHub&gt;();
          if (context != null)
              context.Clients.All.SendMeData(dataString);
      }
  }
  </code></pre>
  
  <p>I have this code in Startup.cs:</p>
  
  <pre><code>public partial class Startup
  {
      public void Configuration(IAppBuilder app)
      {
          ConfigureAuth(app);
  
          app.MapSignalR(new HubConfiguration
          {
              EnableDetailedErrors = true
          });
      }
  }
  </code></pre>
  
  <p>The problem I am having is that when the C# client calls hubConnection.Start().Wait(); I get a very unhelpful exception. Here is the exception:</p>
  
  <pre><code>StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content:
  System.Net.Http.StreamContent, Headers:  Transfer-Encoding: chunked
  X-SourceFiles: =?UTF-8?B?QzpcTXlEZXZcUmVhbHRpbWVNRFxSZWFsdGltZU1EUHJvdG9cUmVhbHRpbWVNRFByb3RvXHNpZ25hbHJcbmVnb3RpYXRl?=
  Cache-Control: private  Date: Thu, 27 Apr 2017 04:23:18 GMT  Server: Microsoft-IIS/10.0
  X-AspNet-Version: 4.0.30319  X-Powered-By: ASP.NET  Content-Type: text/html; charset=utf-8
  </code></pre>
  
  <p>I set break points in the server code and it never hits any of them.</p>
  
  <p>How do I figure this out?</p>