MembershipTest

MembershipTest

Old forum URL: forums.lhotka.net/forums/t/5753.aspx


MBursill posted on Thursday, November 06, 2008

I'm digging through the samples and I came across this:

Csla.ApplicationContext.User =
    MyPrincipal.Login("test", "Test4|ife");

Where are those credentials coming from? Is this username/password combination built into the ASP.NET development server?

Thanks.

-Mike.

RockfordLhotka replied on Thursday, November 06, 2008

If that is the membership provider sample, the sample database (on the web server) includes a user entry that was set up using the standard ASP.NET membership config admin pages, for the purpose of the demo.

I imagine in a real app you'd prompt the user for their username/password and use the Csla.Security.MembershipIdentity to authenticate those values.

The code you are looking at is slightly more complex than it needs to be. You can actually create instances of MembershipIdentity directly if you don't need to customize the identity. I think I created a more basic demo in the CslaNet\cs folder, because I do cover this in the 2008 book.

Copyright (c) Marimer LLC