Question:
I play with forms authentication and my own custom membership provider.
From what I see, I can get the current FormsIdentity form by doing:
System.Web.Security.FormsIdentity veryFunny= (System.Web.Security.FormsIdentity)
System.Web.HttpContext.Current.User.Identity;
And I can get the current membership user to do this:
var UserFromDb = System.Web.Security.Membership.GetUser();
And then I can get userid by doing the following:
var MyUserId = UserFromDb.ProviderUserKey;
I find it funny that when I call Memberhip.GetUser (), it calls this method in the membership provider
public override MembershipUser GetUser(string username, bool userIsOnline)
What is looking for user information in the database.
So, I realized that the .NET framework is inside
GetUser(System.Web.HttpContext.Current.User.Identity.Name, whatever);
USERNAME.
, -, , , .
-, , , , .
-, , , , , .
.
, microsoft , , .
, :
?
?
:
, FormsIdentity string, userdata.
, ASP.NET ?