I currently building web management system using mvc3
In my application i have system section that required login for only admin.
and presentation web that also have a sign in form for users that registered to the site.
i want to accomplish that when unregistered visitor try to enter action in controller he will redirect to Login View
but, when unregistered visitor try to enter action in system controller he will redirect to another login view.
is it posible?
I know that i can put this line in web.config
<forms loginUrl="~/Account/LogOn" timeout="2880" />
but this line always redirect the user to the same login url
Can i put web.config inside folder inside View folder?
You could write a custom Authorize attribute and override the HandleUnauthorizedRequest in which you would redirect to some other login view. Then simply decorate the SystemController with this custom attribute instead of using the standard one which redirects to the url in web.config.