Showing posts with label login. Show all posts
Showing posts with label login. Show all posts

Wednesday, March 28, 2012

importing users into membership database

Hi, i have a new site built in .net using the login/membership system. i have a legacy database (access) of users from the previous site with email, name, password, etc.

Is it possible to import this data straight into my new membership tables through some insert statement, software or through some other way?

You can do it in code. Use the method CreateUser.

That is: Membership.CreateUser(...

Friday, March 23, 2012

Importing old data into asp_tables...?

I have created an application that uses the login, create, etc login components in .net. How hard is it to convert all my old users, passwords, usertypes into the new tables. It almost looks like I have to do them by hand and created a new guid(userid), along with the same guid in the aspnet_usersinroles and aspnet_Membership. Is there a script to do this programatically?

Hi,

You can use t-sql cursor to go record by record thru your old table and inserting to asp.net tables. The difficult part is passwords. I think it would be too difficult to decode and encode password in t-sql.

So, probably first import data and then use asp.net to re-encode passwords. As far as I know there are no utilities to do it automatically.