Author: vbird2k | Posted on: 8/24/2010 10:01:53 AM | Views : 272

Hello, friends,
We have a web application using VS 2008, c#. We try to filter siteMap nodes based on security roles. We have our customized the mether GetRolesForUser() in RoleProvider class to determine a user's role. In this method, roles will be returned by querying an SQL Server database.
However, we found that each time a page was loaded/refershed, this  GetRolesForUser() was called, and the database would be queried. This is too MUCH and expensive.
We thought the roles should be queried only once when a user logs in. After that, role info should be stored somewhere for this user, rather than query DB all the time.
Any ideas, reference paper, snipet,...,?
Thanks a lot!
...

Go to the complete details ...