title: Form Authentication in MVC
body: <p>I have a Form Authentication in MVC application. The login page is hosted in the below url. The code is :</p>
  
  <pre><code> &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="http://localhost:100/MyLogin.aspx?ReturnUrl=%2f" name="adCookie" protection="All" timeout="10" slidingExpiration="true" defaultUrl="~/Default.aspx" enableCrossAppRedirects="true" /&gt;
      &lt;/authentication&gt;
  </code></pre>
  
  <p>My App_Start has following RouteConfig file </p>
  
  <pre><code>routes.MapRoute(
                  name: "Default",
                  url: "{controller}/{action}/{id}",
                  defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  </code></pre>
  
  <p>So I gave the authentication redirect in Index Action of Home controller like below. </p>
  
  <pre><code>public class HomeController : Controller
      {
          public ActionResult Index()
          {
              return Redirect(FormsAuthentication.LoginUrl);
  
              //return View();
          }   
      }
  </code></pre>
  
  <p>But, how will I now be able to go to my applications required Controller and View after it is been authenticated?</p>