MVC Site - Ensuring the default entry view is always correct
Posted
by Klaptrap
on Stack Overflow
See other posts from Stack Overflow
or by Klaptrap
Published on 2010-04-20T10:09:02Z
Indexed on
2010/04/20
10:13 UTC
Read the original article
Hit count: 415
I have a MVC site with AD authorization. This is all working fine. I publish the site to the webserver and call the site directly (http://intranet). If I have not logged in for a while (I have an authorised cookie with a 30 minute TTL), I am prompted to log-in and if successful I am redirected to the homeController's index view. This is great and as expected.
If I keep the session open (browser open) and browse away from the site, if I then browse back to http://intranet, I am not challenged as I have recently authenticated but the default page is from a different controller and not the home page view.
How can I stop this from happening? It cannot be a session setting as this is not a new session and the routes appear correct - they are not beng called at this point anyhow.
Please MVC guru's advise....!
© Stack Overflow or respective owner