sql server - Does asp.net do any caching when checking for [Authorize(Roles = "Student")] -
sql server - Does asp.net do any caching when checking for [Authorize(Roles = "Student")] -
i have method limit utilize people have role of "student". explore different ways of doing this.
first know can decorate method this:
[authorize(roles = "student")]
if know role of "student" has roleid of 4 , if know user has userid of 2 then:
is decoration of method more efficient allowing every user role , doing select against identity 2 database see if user 2 has roleid of 4 in aspnetuserroles table.
as fyi using webapi asp.net identity 2.1 , token bearer authentication. users access through web browser front-end. if there no caching way switch on caching appreciate advice help advise me on how utilize if not enabled default.
you can enable caching feature of role provider web.config using cacherolesincookie
. see this link more details.
alternately can override default role provider (see this link more details), guess not looking after...
asp.net sql-server asp.net-mvc asp.net-web-api
Comments
Post a Comment