cathal connolly wrote:
please note, the NetFourMembershipProvider class is just created as an example in that article (i.e. it's not a class you learn) - what they've done is inherit from SqlMembershipProvider so they can use the methods from that (the this.Decrptpassword call is calling the SqlMembership provider superclass which knows to read the decryption key from the web.config and any other actions required)
I see the implementation in the article now -- don't know how I missed that.
So, I download the source code for the ASP.NET 2.0 Providers here: http://download.microsoft.com/download/a/b/3/ab3c284b-dc9a-473d-b7e3-33bacfcc8e98/ProviderToolkitSamples.msi
I've made a paste of SqlMembershipProvider.cs for your convenience here: http://pastebin.com/fbWhPsR5
A few things have me confused. This class inherits directly from MembershipProvider, and in that class DecryptPassword is a virtual method: http://msdn.microsoft.com/en-us/libra...
However, SqlMembershipProvider does not provide an implementation of DecryptPassword, even though it does refer to it one time on line 1923:
byte[] bRet = DecryptPassword( bIn );
So that is mysterious. Similarly, I cannot find any implementation of EncryptPassword.
So these methods are vitual in the superclass, and not defined in this class -- how is the class working?
Thanks,
Jonah