.net - ASP.NET ProfileBase.Create behavior when supplied with an existing username -


Returns the ProfileBase associated with the existing user, then ProfileBase.Create (and If the user name

sorry for the trivial question, but the MSDN document actually helped very little.

Here is the code for ProfileBase.Create () :

  Create a public stable profilebase (string user name), Bool is authorized) Procedure (Profile Manager. Enabled) {new provider exception throw (SRkGetString ( "Profail_not_anabddh")); } Initial static (); If (s_SingletonInstance! = Null) {return s_SingletonInstance; } If (s_Properties.Count == 0) {lock (s_InitializeLock) {if (s_SingletonInstance == empty) {s_SingletonInstance = new DefaultProfile (); } Return s_SingletonInstance; }} HttpRuntime.CheckAspNetHostingPermission (AspNetHostingPermissionLevel.Low, "Feature_not_supported_at_this_level"); Return CreateMyInstance (username, isAuthenticated); } Private Static ProfileBase CreateMyInstance (String Username, bool isAuthenticated) {Type Profile Type; If (hosting environment. Ishosted) {profileType = BuildManager.GetProfileType (); } Other {profileType = inheritanceFormat; } ProfileBase base2 = (ProfileBase) Activator.CreateInstance (profile type); Base2.Initialize (user name is isAuthenticated); Return base 2; }  

It seems that it always gives a new example of ProfileBase.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -