views:

65

answers:

1

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?

+1  A: 

Check that the route for /blah/do exists. If it can't find it then it is going to redirect to the default page.

iaimtomisbehave