I'm working on an MVC3 project and i have to add a login mechanism. I have to use the <authentication> method. I thought that this would automatically redirect users to the login page? But nothing is happening.
I have this in my web.config file:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
But my login controller isn't invoked automatically. What do i have to do to make it work the way i want?