Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > dotnet security > may 2005 >

dotnet security : Migrating users to asp.net 2.0 from CSK and setting passwords


burtonman
5/20/2005 7:56:05 AM
Hello -

I have existing users in a CSK-schema who each have passwords. I need to
migrate these users to the asp.net tables in .net 2, but I haven't found any
way to set the new passwords, password salt and password question properly.

Is it possible to use t-sql to migrate these records or do I have to use the
..net framework? Where do I access the tools to set the passwords properly?

Dominick Baier [DevelopMentor]
5/20/2005 2:42:13 PM
Hello burtonman,

i assume the password in your source store are cleartext.

You have to programmatically migrate the users. Grab a copy of Reflector
(www.aisto.com/roeder) and have a look at SqlMemberShipProvider.CreateUser()
in System.web.dll.
They basically create a 16byte salt with RNGCryptoServiceProvider (as Base64)
and hash the password and the salt with the configured hashing algo.

Another option would be to write your own membership provider to map to your
old schema. documentation for doing this is in msdn.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

[quoted text, click to view]


AddThis Social Bookmark Button