Hi Everybody.
So, I come from a ASP.NET 2.0 WebForms background and am new to ASP.NET MVC which I find it wonderful, however, i've been somewhat accostumed to it.
This time, my problem has to do with Authentication and Authorization Model:
I used to restrict folders via Web.config's authorization section
<authorization>
<deny users="?"/>
<!--
<allow users="*"/>
-->
</authorization>
So when a user tries to access a private "page" be redirected to index page; How can I do this on MVC? I used to save the user id (or object) in the session data... now I don't know how or where to store it, in a MVC'ish way.
As a side note, my data model has a table like this:
CREATE TABLE user_perm (
user INT,
feature INT,
)
And I would like to restrict access to certain controllers based on the content of this table. Ho w can I achieve it?
PS: i'm aware of these other questions, but they refer to beta version and I'm unsure if yet apply to the current released version.
Thanks in advance