Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Trouble redirecting after login

$
0
0

Not sure what's happening here, I've verified the login code below runs correctly but i cannot redirect to any page...it always goes back to the login page.  I've run this on Chrome and Safari - same results.

public ActionResult Login(LoginModel model, string returnUrl)
{
    if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))    {return RedirectToLocal(returnUrl);
       //return RedirectToAction("Index", "Home");
    } ...
<authentication mode="Forms"><forms loginUrl="~/Account/Login" timeout="2880" cookieless="UseCookies"/></authentication>

Fiddler shows that a cookie is being set and passed on the next request but it seems like it's being ignored. Any ideas on what might be happening?

Thanks

Tim


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>