views:

1238

answers:

3

What is the best way to implement security using active directory roles on an asp.net dynamic data site?

I would like to restrict certain views (and the related links) to certain roles. i.e. user A can only view list actions for table x and user B can only view list actions for table y

A: 

You can just use the ASP.NET Active Directory Memebrship & Role providers to authenticate \ authorize the users to the application. Then you can call the Roles.IsUserInRole where ever you want to check for the AD role membership to check users are a part of the relevant group(s) before rendering the contents.

RM
+1  A: 
Kelsey
A: 

I have a number of articles on this on my blog here A DynamicData Attribute Based Permission Solution using User Roles and here DynamicData: Database Based Permissions - Part 1 and I would also have alook at Securing Dynamic Data sample on codeplex which uses a Route Handler.

Wizzard