Importing/Exporting users/groups

Vote:
 

Hi,

Sorry, but I was not able to find an answer on aforementioned question, which is:

Is it possible to import/export users and groups in Episerver 7.1, while using SqlServerMembershipProvider and SqlServerRoleProvider by using CMS only means?

#75691
Oct 03, 2013 19:07
Vote:
 

When using SqlServerMembershipProvider/RoleProvider, the users and groups are stored in .NET default tables, not EPiServer-specific tables. The tables are prefixed "aspnet_*" and the tables you need are called:

  • aspnet_Membership
  • aspnet_Roles
  • aspnet_Users
  • aspnet_UsersInRoles
  • aspnet_Profile

The import/export feature in EPiServer does not include users and groups (only Visitor Groups), but you could export these tables using the "Script table as.." tool in SQL Server Management Studio, and then run that script to insert the data in your target database.

 

 

#75692
Oct 03, 2013 20:30
Vote:
 

Yes, this one of the last resorts, which I've could imagine to myself, but it does not address following possible issues:

1) Whatif somebody on target installation already added more users and/or roles that I have?

2) Still, security setup would not be transfered in that way :(

Let me exaplin a little bit: I am newcomer to EpiServer from Sitecore. Sitecore strongly discourages any direct database operations, and, actually, stores users and groups in the same way, as EpiServer does (using .NET default tables). But, Sitecore allows to export/import users and security... Maybe there is a way to accomplish this task with EpiServer?

#75701
Oct 04, 2013 7:45
Vote:
 

You could hookup to Export/Import and add additional data to the package e.g. as described here: http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2011/3/Mirror-other-than-content/

However as mentioned in that blog post users are tricky to export/import since the Membership API does not support to retrieve the password in cleartext (which is obvisouly good for security reasons). And since EPiServer supports different kinds of providers it is not possible to access user data in a "lower" layer (e.g. database) than Membership API.

But if you are using a specific provider you could do it your self at a lower level for example as Arild suugests.

#75704
Oct 04, 2013 8:06
Vote:
 

Thanks, just one quick question:

http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2011/3/Include-ACL-during-Import-Mirroring-and-Copy/ - do EpiServer 7 still also include ACLs in Exported content?

Cause if yes, than your prior module seems to fullfill my needs completely (users password problem is known to me, it is also the same in Sitecore - user would be delivered, but in locked state and without any password), so actually, I do need only Roles to be exported /imported correctly to keep consistency over environments

#75705
Oct 04, 2013 8:24
Vote:
 

Yes, the ACLs are still included.

#75706
Oct 04, 2013 8:26
Vote:
 

Thanks. That's awesome and perfectly fits then in our CI strategy :)

Just some coding and we would be into business back

#75707
Oct 04, 2013 8:31
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.