title: How to generate URL from WebAPI method
body: <p>Here's my WebAPI action..</p>
  
  <pre><code>public class AuthenticationController : ApiController
  {
  
      [Route("api/auth/login")]
      [HttpPost]
      public object Login([FromBody] LoginViewModel loginViewModel)
  
      ...
  </code></pre>
  
  <p>How do I generate a URL inside a MVC view?</p>
  
  <p>I've tried this...</p>
  
  <pre><code>@Url.HttpRouteUrl("DefaultApi", new { controller = "Authentication", action=  "Login" })"
  </code></pre>
  
  <p>... but it says that <code>DefaultApi</code> doesn't exist.</p>
  
  <p>Why does the method want a route name <em>and</em> route parameters?</p>
  
  <p>How did they manage to make routing even more complicated than regular MVC?</p>
  
  <p>What kind of web framework makes requesting a web page / API method / web service thing difficult? Its ridiculous.</p>