ASP аутентификация.NET против Active Directory и Ролей через ролевого поставщика ASP.NET

Можно также хотеть проверить проект Cgit, так как они сделали что-то подобное (кроме, они создают свою собственную библиотеку мерзавца - также, чтобы не работать git непосредственно).

существует JGit, чистая реализация Java, которая может быть полезна для Вас.

5
задан Joel Coehoorn 14 October 2009 в 23:39
поделиться

4 ответа

Yes! The ASP.NET role provider is designed to work exactly in that case - the particulars of the authentication provider are irrelevant to the role provider, and it will store the bare essential information to make the two work together - basically the user's AD identity (domain\user) is tracked in the role database and matched up when necessary.

3
ответ дан 14 December 2019 в 13:41
поделиться

There is an ActiveDirectoryMembershipProvider that can be used to use Active Directory for authenticating users.

Alternatively, you could roll your own MembershipProvider by extending the abstract MembershipProvider class and then use System.DirectoryServices to check against Active Directory when validating a user (ValidateUser method of MembershipProvider). This is pretty straightforward to do and you need only implement the methods that you actually need in the custom provider.

You might consider implementing your own RoleProvider too, depending on whether the default fits your needs.

3
ответ дан 14 December 2019 в 13:41
поделиться

Use it all the time, intranet only of course.

You may be interested in the WindowsTokenCachingRoleProvider. In scenarios where performance is essential, this really shines:

http://lvildosola.blogspot.com/2007/02/improve-performance-when-using.html

Simple and elegant.

0
ответ дан 14 December 2019 в 13:41
поделиться

Please take a look at this question, seems like you're asking for pretty much the same thing, and my answer there should give you what you need.

ASP.NET Membership and Role providers that can be used from ASP.NET and WinForms/WPF clients as needed.

0
ответ дан 14 December 2019 в 13:41
поделиться
Другие вопросы по тегам:

Похожие вопросы: