title: Converting HttpRequestMessage to OwinRequest and OwinResponse to HttpResponseMessage
body: <p>I have a web API message handler <code>MyHandler</code> that I want to run in OWIN pipeline as a middleware. So configuring the handler like this.</p>
  
  <pre><code>public class Startup
  {
      public void Configuration(IAppBuilder app)
      {
          app.UseHttpMessageHandler(new MyHandler());
  
          HttpConfiguration config = new HttpConfiguration();
  
          config.Routes.MapHttpRoute(
              "DefaultWebApi",
                  "{controller}/{id}",
                      new { id = RouteParameter.Optional });
  
          app.UseWebApi(config);
      }
  }
  </code></pre>
  
  <p>Handler is very simple and does nothing.</p>
  
  <pre><code>public class MyHandler : DelegatingHandler
  {
      protected override async Task&lt;HttpResponseMessage&gt; SendAsync(
               HttpRequestMessage request, CancellationToken cancellationToken)
      { // &lt;--- breakpoint here
  
          var response = await base.SendAsync(request, cancellationToken);
          return response;
      }
  }
  </code></pre>
  
  <p>I put a break point inside <code>SendAsync</code> and it does break but the following <code>base.SendAsync</code> bombs silently and I see <code>A first chance exception of type 'System.InvalidOperationException' occurred in System.Net.Http.dll</code>.</p>
  
  <p>I can quite easily add <code>MyHandler</code> to <code>config.MessageHandlers</code> and it will run perfect in the Web API pipeline but that's not what I want to do. I want to run <code>MyHandler</code> in the OWIN pipeline. Is this possible at all? It should be. Otherwise, there is no point in having the extension method <code>UseHttpMessageHandler</code>, I guess. Just that I couldn't figure out a way to do what I want to do.</p>