title: Signalr assembly loading issue OWIN
body: <p>I'm getting this error when attempting to load classes in the <code>Microsoft.AspNet.SignalR.Owin</code> assembly.</p>
  
  <p>The exception is thrown after execution leaves the <code>Configuration</code>method in <code>startup.cs</code>. I've registered a Global Exception Handler to try and catch the exception but it is not being caught.</p>
  
  <pre><code>public async override Task HandleAsync(ExceptionHandlerContext context, CancellationToken cancellationToken)
          {
  
              var exception = context.Exception;
  
              const string genericErrorMessage =  "An unexpected error occured";
              var response = context.Request.CreateResponse(HttpStatusCode.InternalServerError,
                  new
                  {
                      Message = genericErrorMessage
                  });
  
              response.Headers.Add("X - Error &amp; ", genericErrorMessage);
              context.Result = new ResponseMessageResult(response);
          }
  </code></pre>
  
  <p><code>config.Services.Replace(typeof(IExceptionHandler), new GlobalExceptionHandler());</code></p>
  
  <p>the Application_Error method in Global.asax doesn't catch it either</p>
  
  <pre><code> protected void Application_Error(object sender, EventArgs e)
      {
          HttpContext ctx = HttpContext.Current;
          KeyValuePair&lt;string, object&gt; error = new KeyValuePair&lt;string, object&gt;("ErrorMessage", ctx.Server.GetLastError().ToString());
          ctx.Response.Clear();
      }
  </code></pre>
  
  <p>I've tried reinstalling the assembly but to no avail.</p>
  
  <p>There's <a href="https://stackoverflow.com/questions/28436428/signalr-warning-on-startup">two</a> <a href="https://stackoverflow.com/questions/29811844/reflectiontypeloadexception-when-trying-to-add-microsoft-aspnet-signalr-redis">other</a> questions on SO but no solutions</p>
  
  <p>Despite configuring Visual studio to break on every possible type of exception, this is still not being caught. The only place i can tell an exception has occurred is in the output window. Nothing is logged to the event logs.</p>
  
  <p>For info this is using VS 2015</p>
  
  <blockquote>
    <p>SignalR.ReflectedHubDescriptorProvider Warning: 0 : Some of the
    classes from assembly "Microsoft.AspNet.SignalR.Owin, Version=1.2.2.0,
    Culture=neutral, PublicKeyToken=31bf3856ad364e35" could Not be loaded
    when searching for Hubs. [...\Microsoft.AspNet.SignalR.Owin.dll]</p>
    
    <p>Original exception type: ReflectionTypeLoadException</p>
    
    <p>Original exception message: Unable to load one or more of the
    requested types. Retrieve the LoaderExceptions property for more
    information.</p>
  </blockquote>
  
  <p>EDIT: I'm running all the latest Signalr packages</p>
  
  <p>Installed signalr related packages</p>
  
  <p>Autofac.SignalR v 3.0.2</p>
  
  <p>Microsoft.AspNet.SignalR v2.2.0</p>
  
  <p>Microsoft.AspNet.SignalR.Core v2.2.0</p>
  
  <p>Microsoft.AspNet.SignalR.JS v2.2.0</p>
  
  <p>Microsoft.AspNet.SignalR.Owin v1.2.2</p>
  
  <p>Microsoft.AspNet.SignalR.SelfHost v2.2.0</p>
  
  <p>Microsoft.AspNet.SignalR.SystemWeb v2.2.0</p>