More in this section

Moving users

5 posts, 0 answered
  1. Ross Reichardt
    Ross Reichardt avatar
    31 posts
    Registered:
    14 Aug 2009
    13 May 2010
    Link to this post

    Hi team!

    My old site is done in straight asp.net - not using any CMS. I am rewriting the site in Sitefinity and now I want to migrate all (>120) the users from the old site to the new. 

    The users on the old site use the ASP.NET membership feature while on the new site I am using the sitefinity membership feature and the schema of the database tables is different between the two.

    I have been trying to migrate users from the asp.net membership feature to the sitefinity membership feature using SQL queries and it brings the users across OK but I lose all the profile properties. Looking in the telerik_UserMetaInfo table, all the user profile data is there but when I administer a user from the Sitefinity admin backend, none of the profile properties are there. If I add the properties and try to save the user, I get a primary key violation exception. So, there is something not right in the table.

    Do you have any utilities, tech tips or advice on how best to migrate the users?

    Thanks once again and best regards,

    Ross.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 May 2010
    Link to this post
    Hi Ross Reichardt,

    1. You could use your Membership, Role and Profile providers with Sitefinity. You just have to add connection string to your old database server and set the providers.

    2. You could migrate the users by creating a list of your users and then using MembershipUser,  MembershipUserCollection and ProfileBase classes you could create new users in Sitefinity's provider. If you use encrypted/hashed password you should decrypt it.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Ross Reichardt
    Ross Reichardt avatar
    31 posts
    Registered:
    14 Aug 2009
    21 May 2010
    Link to this post

    Hi Ivan.

    Thanks for your reply. I did originally try to develop my own membership provider but had trouble inserting it into Sitefinity. So, I have a customised version of the Sitefinity membership provider which works fine. If I add users and add profile data for the users through the admin page, I have no problem.

    However, I have 176 web site users on the current web site. That site uses a customised version of the asp.net membership provider so all the user data is in the aspnet_xxx user and membership tables. 

    What I am trying to do is migrate that data from the aspnet_xxx tables in the database for the old site to the telerik_users and telerik_usermetainfo tables for the new site. The SQL server queries work without error and all the data is inserted in to the telerik_users and telerik_usermetainfo tables for the new site.

    My problem is that the profile data does not show up. I can see all the users but none of those users has profile data available. I have modified profile fields including a user first name field which is populated with the username and not the users first name. The weird thing is that even though no profile data is displayed in the sf admin page, if I click the 'Save' button, sf throws a Primary Key Violation exception. So, it knows the data is there but can't read it? 

    I have tried every thing I can think of and now am out of ideas. I have just tried adding usermetadata with the 'telerik_UserMetaInfo_ins' stored procedure. Again, the data gets into the telerik_UserMetaInfo table but isn't displayed in the profile display / edit admin page.

    I am about to try doing all this on a different server to see if it works on a different machine. I'll let you know how that goes but in the meantime if you have any other thoughts I would love to hear them!

    Thanks and apologies for the long post.

    Regards,

    Ross.

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    21 May 2010
    Link to this post
    Hello Ross Reichardt,

    The profile data for each user is coming from a third provider - the profile provider. Whenever you change user's profile data you have to call Save method of the profile object in order to save the data in the profile provider. Generally membership and role providers which inherit from the ASP.NET ones can be used within the CMS as they implement the same methods as ours, just in a different way. What you can also do would be to export your users, their profiles and roles to which they belong to in a CSV file. Then use the tool from this forum thread to import them in the CMS without mapping custom providers.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Ross Reichardt
    Ross Reichardt avatar
    31 posts
    Registered:
    14 Aug 2009
    21 May 2010
    Link to this post

    Hi Radoslav!

    That is a wonderfully fast reply - thank you so much. I'll work through your suggestion and hopefully that will get me up and going.

    Thanks and regards,
    Ross.

Register for webinar
5 posts, 0 answered