"Remember me" remembers me but doesn't do anything

H

Harlan Messinger

On the default page in my ASP.NET application I have a Login control.
When I log in successfully, it takes me to the page indicated in the
control's DestinationPageUrl property.

I have the control configured to display the Remember Me checkbox. I
know the Remember Me feature works, because the LoginControl is inside
the AnonymousTemplate of a LovingView, and when I close the browser tab
and then reopen the default page, the Login form is absent, as it should
be, because I'm already logged in.

But that's the problem: I'm still on the default page. I'd only put the
LoginView there to verify that I was logged in. What I would expect to
happen, what I *want* to have happen, is that when I arrive at this page
and it remembers me, it should do the same thing it does when I log in
manually: take me to the DestinationPageUrl page. I do I get it to do that?
 
P

Patrice

Hi,

The problem could be that the login page is your default page. So by default
you'll get this page in a browser.

The trick is to not use the default page as the login page. This way, if
they are not logged the target page will be remembered using ReturnUrl and
they'll be redirected there once logged. If they are remembered they will
directly access this default page. You have nothing special to do.

If you are using your own mechanism (if I remember ASP.NET uses ReturnUrl
not DestinationPageUrl, you likely miss a redirect statement).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top