When a anonymous user tries to access a page that requires authentication, I redirect to the login controller/action:
/user/login?ReturnUrl=/blah/do
Upon logging in, I do:
FormsAuthentication.RedirectFromLoginPage(user.Id.ToString(), false);
The debugger shows that this line does get called.
But then I get redirected to default.aspx (defaultUrl), not the url in the RedirectUrl querystring param.
Did I miss something?