title: How can I configure a route for WebApiConfig to redirect some requests to static html page?
body: <p>I'm working on a webApi application, and the api I want to get is the following:</p>
  
  <ul>
  <li>api/v1/lists/?params...</li>
  <li>api/v1/meta/?params... </li>
  <li>api/v1/debug</li>
  </ul>
  
  <p>There are ApiControllers that work fine for "lists" and "meta" routes, but <code>api/v1/debug</code> should return a static html page.</p>
  
  <p>I could think of two ways of implementing it: </p>
  
  <ol>
  <li>via special controller that would return something like <code>View("mypage.html")</code> or</li>
  <li>configure routes in WebApiConfig to redirect requests like <code>api/v1/debug</code> to <code>mypage.html</code></li>
  </ol>
  
  <p>However, I couldn't get working version of any of these ways: there is no content type for <code>HttpResponseMessage</code> like <code>HtmlContent</code> or similar, so I can't do smth like</p>
  
  <pre><code>config.Routes.MapHttpRoute(
      name: "Debug",
      routeTemplate: "api/v1/debug/",
      defaults: new { controller = "Debug" }
      );
  </code></pre>
  
  <p>...</p>
  
  <pre><code>public class DebugController:ApiController
  {
      public HttpResponseMessage Get()
      {
          return new HttpResponseMessage()
          {
              Content = new HtmlContent("mypage.html");
          };
      }
  }
  </code></pre>
  
  <p>and I can't get right redirection in WebApiConfig:</p>
  
  <pre><code>//this results into 400 status code:
  config.Routes.MapHttpRoute("Default", "api/v1/debug/", "~/mypage.html");
  </code></pre>
  
  <p>Could you please tell me what would be the right solution for this problem?
  And is it possible at all to combine static html pages with Action Results in WebApi application?</p>