Upgrade Enterprise Library 1.0 to 4.0 [UserRoleManger]

Topics: Security Application Block
Jul 2, 2008 at 3:12 AM
I am working on upgrading application from Enterprise Library 1.0 to 4.0

 In our code we are using UserRoleManager to add/delete user/roles.
[Security Application Block]

But this method is no longer available. Can you tell me what is substitute method for this in EL 4.0

Methods we are using are
CreateRole()
GetUserRoles
GetAllUsers()
GetAllRoles()
GetUserIdFromUserName()

Thanks
Satinder
Jul 2, 2008 at 11:40 AM

Hi,

The role management features are now provided by the .NET framework. You can get some information about this change at http://msdn.microsoft.com/en-us/library/cc511594.aspx. You can also look at the Membership and Role classes, as well as the updated security quickstart included with EntLib's source code.

Fernando


varma_sati wrote:
I am working on upgrading application from Enterprise Library 1.0 to 4.0

 In our code we are using UserRoleManager to add/delete user/roles.
[Security Application Block]

But this method is no longer available. Can you tell me what is substitute method for this in EL 4.0

Methods we are using are
CreateRole()
GetUserRoles
GetAllUsers()
GetAllRoles()
GetUserIdFromUserName()

Thanks
Satinder



Jul 10, 2008 at 6:39 PM
Edited Jul 10, 2008 at 7:06 PM
Membership and Role classes are in System.Web.Security Namespace. I do not see any thing similar for the Window based application.
How to implement for the Window based application or in WPF.

We managed to get Roles from the database using RolesFactory.GetRolesProvider("ProviderName"). Is there any way to drive the Role manager from database.

Thanks
Krishna
Jul 10, 2008 at 10:40 PM
Even though the Role and Membership classes belong to the System.Web.Security namespace they can be used from desktop apps; the Security QuickStart itself uses them.

The built in role providers include a Sql version. You can get more information from http://msdn.microsoft.com/en-us/library/6b241xwt.aspx.

Fernando


kkolla wrote:
Membership and Role classes are in System.Web.Security Namespace. I do not see any thing similar for the Window based application.
How to implement for the Window based application or in WPF.

We managed to get Roles from the database using RolesFactory.GetRolesProvider("ProviderName"). Is there any way to drive the Role manager from database.

Thanks
Krishna