Form authentication doesn't redirect to defaultUrl while implementing “remember me” feature in login

StackOverflow https://stackoverflow.com/questions/1596882

Question

I have an ASP.Net website which has a "remember me" feature for Login page. It uses form based authentication and the defaultUrl points to a Default page, but when the site is visited even though the session is authenticated user isn't redirected to default page but stays in Login page. This only happens in Live site, it works perfectly fine at dev environment.

What could be the reason? Is there any way to fix it.

Thanks

Was it helpful?

Solution

Add a check to User.Identity.IsAuthenticated on your login page and redirect to the DesitionationPageUrl

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top