title: RedirectioToUrl not working, instead it goes back to the post method and shoes returnUrl string in the url in the browser
body: <pre><code>[AllowAnonymous]
  public class AuthController : Controller
  {
  
      [HttpGet]
      public ActionResult Login(string returnUrl)
      {
          ViewBag.ReturnUrl = returnUrl;
  
         return View();
  
      }
  
  
      [HttpPost]
      [ValidateAntiForgeryToken]
      public ActionResult Login(LoginViewModel model)
      {
          if (ModelState.IsValid)
          {
              PartialLogin login = new PartialLogin();
  
  
              if ((model.BusinessEmail != null &amp;&amp; model.BusinessPassword != null) ||
                  (model.InvestorEmail != null &amp;&amp; model.InvestorPassword != null))
              {
  
                  if (login.ValidateBusinessLogin(model.BusinessEmail, model.BusinessPassword))
                  {
                      FormsAuthentication.SetAuthCookie(model.InvestorEmail, true);
  
                      Session["BusinessUserEmail"] = model.InvestorEmail;
  
  
                      return RedirectToAction("Index", "Business");
                  }
  
                  //if (login.ValidateInvestorLogin(model.InvestorEmail, model.InvestorPassword))
                  //{
                  if (model.InvestorEmail == "mahamQ@gmail.com")
                  {
                     FormsAuthentication.SetAuthCookie(model.InvestorEmail, true);
  
                      Session["InvestorUserEmail"] = model.InvestorEmail;
  
                      return RedirectToAction("Index", "Investor");
                  }
              }
              else
              {
                  return RedirectToAction("Login", "Auth");
              }
  
          }
  
              return View();
  
  
      }
  
  }
  </code></pre>
  
  <p>My original after clicking on Login on index page the url is Localhost/WebappCustom/Auth/Login, however after submitting the form, the url becomes as shown in the image and stays on the same login page rather than changing to localhost/WebAppCustom/Investor/Index</p>
  
  <p><a href="https://i.stack.imgur.com/SiOMe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SiOMe.png" alt="enter image description here"></a></p>