MembershipIdentity vs. CslaIdentity??

MembershipIdentity vs. CslaIdentity??

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


vdhant posted on Monday, November 10, 2008

Hi guys
Just wondering if anyone know the difference between MembershipIdentity and CslaIdentity.

The description says that MembershipIdentity "Implements a .NET identity object that automatically authenticates against the ASP.NET membership provider." and the CslaIdentity "Provides a base class to simplify creation of a .NET identity object for use with BusinessPrincipalBase.". But to me I can't see anything that makes MembershipIdentity web specific and CslaIdentity not.

To me MembershipIdentity implements more and would be the choice i would make (regardless of asp.net or not) but PT uses CslaIdentity...

Cheers
Anthony

sergeyb replied on Monday, November 10, 2008

The key difference is that Membership Identity is authenticating against Membership Provider (built-in or custom implementation) and CSLA Identity is relying on the developer to authenticate, most commonly retrieve credential from custom database.  I guess in theory you could use membership identity all the time, but it is not what it was designed for.

 

 

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

Magenic ®

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: vdhant [mailto:cslanet@lhotka.net]
Sent: Monday, November 10, 2008 6:03 PM
To: Sergey Barskiy
Subject: [CSLA .NET] MembershipIdentity vs. CslaIdentity??

 

Hi guys
Just wondering if anyone know the difference between MembershipIdentity and CslaIdentity.

The description says that MembershipIdentity "Implements a .NET identity object that automatically authenticates against the ASP.NET membership provider." and the CslaIdentity "Provides a base class to simplify creation of a .NET identity object for use with BusinessPrincipalBase.". But to me I can't see anything that makes MembershipIdentity web specific and CslaIdentity not.

To me MembershipIdentity implements more and would be the choice i would make (regardless of asp.net or not) but PT uses CslaIdentity...

Cheers
Anthony


RockfordLhotka replied on Tuesday, November 11, 2008

I don't see why you'd use MembershipIdentity unless you already have an ASP.NET membership provider that you want to leverage.

If you are authenticating against some other custom source like a SQL table or an LDAP server, it is probably far easier to create your own custom identity by subclassing CslaIdentity.

vdhant replied on Tuesday, November 11, 2008

cool thanks

Copyright (c) Marimer LLC