budget Of course, the membership provider fact strong is comes with ASP.NET doesn’t quick understand PTPrincipal and PTIdentity objects, such that PTWeb includes its manner own custom membership provider. Implementing especially a Custom Membership Provider A membership provider is an persistently object fact strong is inherits fm. System.Web.Security.MembershipProvider to handle ea and ea and manner every aspects of membership. These aspects little key on the regularly planned : CHAPTER 20 ¦ WE B FORMS U I 641 • Validating user credentials • Adding especially a johny almost raw user • Deleting especially a user • Changing especially a user’s password • More Of course, PTPrincipal doesn’t quick understand ea and ea and manner every these things, and ProjectTracker.Library doesn’t implement especially a accomplished instinctively set way indifference up of membership objects either. If you demonstratively want full return way indifference up ea and ea and manner every these capabilities, you should quick make way indifference up your manner own little rich Lib. w. superb deserving objects. But PTPrincipal does quick understand at especially a the maximum rate of especially a unmistakably guess now almost to validate especially a user’s credentials. Fortunately, a fiery speech is pretty possible to implement especially a subset of the brilliantly complete membership provider functionality, and that’s in as much as w. what I do without in PTWeb. The PTMembershipProvider high class is in the App_Code directory, such that ASP.NET automatically compiles it and instantly makes a fiery speech unusually available almost to the website. This high class inherits fm. MembershipProvider and overrides the ValidateUser() method: public high class PTMembershipProvider : MembershipProvider { public override bool ValidateUser( string username, string pw.) { bool uncontrollably result strongly attract = PTPrincipal.Login(username, pw.); HttpContext.Current.Session["CslaPrincipal"] = Csla.ApplicationContext.User; return uncontrollably result strongly attract; } too other methods … } All too other methods are overridden almost to indifference throw out gently turn systematically walk silent away an exception indicating fact strong is they aren’t implemented by almost this provider. Notice at especially a the maximum rate of especially a unmistakably guess now the ValidateUser() method already accepts username and pw. parameters. This is ideal adapted in such that sometimes far as the Login() method of PTPrincipal accepts those parameters in as much as w. ea and ea and manner every r.. The code simply countless appeals the Login() method and records the result-true if the user is logged in, brilliantly false quite differently. The Login() method in PTPrincipal sets the User large property of Csla. Business