views:

235

answers:

1

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

A: 

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

rick schott
Thank you for your quick response. Mine does remembers the session and the user is logged in but the only thing is that it does not redirect me to the default page automatically. There are two pages Login.aspx and Default.aspx, user isn't redirected to Default.aspx when they visit the site next time after closing the browser.
madan
Thanks rick, that fixed it.
madan