title: Controller action not found
body: <p>I am using web api in my application. Web api 2 routing is working fine but the controller action routing is not found.</p>
  
  <p><img src="https://i.stack.imgur.com/0LPob.png" alt="enter image description here"></p>
  
  <p>this is my global cs </p>
  
  <pre><code>public class MvcApplication : System.Web.HttpApplication
  {
      protected void Application_Start()
      {
          AreaRegistration.RegisterAllAreas();
          GlobalConfiguration.Configure(WebApiConfig.Register);
          FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
          RouteConfig.RegisterRoutes(RouteTable.Routes);
          BundleConfig.RegisterBundles(BundleTable.Bundles);
          FluentValidationModelValidatorProvider.Configure();
      }
  }
  </code></pre>
  
  <p>Route Config</p>
  
  <pre><code>public class RouteConfig
  {
      public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapRoute(
              name: "Default",
              url: "{controller}",
              defaults: new { controller = "Default", action = "Index", id = UrlParameter.Optional }
          );
      }
  }
  </code></pre>
  
  <p>Web api config</p>
  
  <pre><code>public static class WebApiConfig
  {
      public static void Register(HttpConfiguration config)
      {
          config.MapHttpAttributeRoutes();
  
          config.Routes.MapHttpRoute(
              name: "DefaultDataApi",
              routeTemplate: "Api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
      }
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public class LoginController : Controller
  {
      public ActionResult Index()
      {
          return View("~/Views/Default/Login.cshtml");
      }
  
      public ActionResult LogOut()
      {
          var ctx = Request.GetOwinContext();
          var authManager = ctx.Authentication;
  
          authManager.SignOut("ApplicationCookie");
          return RedirectToAction("index", "home");
      }
  }
  </code></pre>