I'm trying to redirect users to my login page if they're aren't logged in. Using areas in mvc, I have an Admin area which holds the login view.
In the root web config i set the authentication mode to forms and the url to point to the login.cshtml in the Admin area. The browser show default aunthorised page, instead of redirecting to login page.
Root Web Config
<system.web> <authentication mode="Forms"> <forms loginUrl="~/Areas/Admin/Views/Account/Login" /> </authentication> </system.web>