MemberhipProvider on asp.net

What is MemberhipProvider used for? Do I need this at all? When using forms authentication, I never specified any membership providers in the configuration file, I authenticated users by calling FormsAuthentication.SetAuthCookie. I read a lot about it yesterday, and I can’t understand why to use it?

+3
source share
3 answers

MembershipProvider is, above all, a pluggable, standardized repository. If you base your authentication on MemberhipProvider, you can exchange it later with another provider without any changes to your website. In addition, it is supported by standard components (Login, LoginView, LoginStatus, LoginName, and PasswordRecovery elements) and can be controlled through ASP.NET administration pages.

+3
source

This is very convenient, as Thor said.

If you use the default controls for usermanagement / login / password reset, etc., you can simply change the web.config parameter and your users will be able to use a different authentication mechanism.

AD, SQL Server ADAM, Federrated Login . , , , , NTLM kerberos, , .

- roleprovider, , .

+3

, , .

, , NotImplementedException , , . 2 3, .

RoleProvider , GetRolesForUser, .

+2
source

Source: https://habr.com/ru/post/1718004/


All Articles