How to create a user by adding a record to aspnet_Membership table

  • My company want me to write the batch file that will import users from old database to the .net membership table. And it must be done using T-SQL, and i cant use the front-end wizard. The problem is: I dont know how to find the key to encrypt and decrypt the password before insert to tables.

    Please help

  • I'm not sure what a .net membership table is, but this is what you need to transfer logins from one SQL Server instance to another: http://support.microsoft.com/kb/918992/. Sp_help_revlogin generates a script to create logins. You won't need to decrypt the passwords for SQL logins and you wouldn't worry about Windows logins passwords anyway. After the logins are transferred, you can create the users in the database.

    Greg

  • Dear Greg,

    Thanks for your reply. Your information was really helpful. However ,it didn't fix my problems just yet. I try to transfer logins from the sql 2000 database that not using the .net Membership (aspnet_Membership ,available from asp.net 2.0 and up) features to the database that already used the .net Membership features . Therefore, those username/password were not encrypted just yet. The only solution (that i've known) is to create the .net app and read all the login into a dataset; and call the create user method to create new account on the new database. However, I wonder if any other way to do directly from the back end using T-SQL. I tried to use the aspnet_Membership_CreateUser but i dont have the key to encrypt the password.Please help

    Regards

    Nick

  • Hi Nick...

    I'm in the exact same boat... any luck?

  • I am having the same problem as well. I can't find any resources on how to import usernames and passwords into that aspnet_membership table.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply