asp.net-mvchttp-redirectauthentication

ASP.NET MVC Login ReturnUrl always NULL?


Using Forms Authentication in ASP.NET MVC when trying to log back into a site, it puts a ReturnUrl parameter in the query string. My Logon action method accepts a "returnUrl" string. However it seems that returnUrl string is always null, even when it is clearly in the query string. Any thoughts on why this might be the case or a possible fix?


Solution

  • Maybe you don't include the ReturnURL parameter into you login form's action attribute, thus posting to a URL without that parameter?