Membership.GetUser () vs Context.User

What are the differences between Memberhip.GetUser () and Context.User and which are recommended to use to get information about the current user?

+5
source share
2 answers

If you do not have the membership configured for your site, getuser () will not do anything.

Context.user is the identity passed in at asp.net runtime and will give the user if authentication is configured for the site other than anonymous access.

+3
source

Membership.GetUser MembershipProvider. . (, ActiveDirectory, SQL Server). Context.User - IPrincipal .

+3

All Articles