-
1
- #1
How to add user to COM+ role using Com+ objects?
I can add role to COM+ application, but when I try do same to add new user to role, it say error. Why it is so? Here is the the code:
Sub AddNewUserToRole(Role As COMAdmin.COMAdminCatalogObject, sUser As String, clRoles As COMAdminCatalogCollection)
Dim a As COMAdmin.COMAdminCatalog
Dim b As COMAdminCatalogCollection
Dim c As COMAdminCatalogObject
Dim d
Dim s As String
Dim i As Long
Set b = clRoles.GetCollection("UsersInRole", GetKey(clRoles, "NextTestRole2") 'it works good
b.Populate
Set c = b.Add
c.Value("Name" = "IT-22\Guest" 'here is error
b.SaveChanges
End Sub
I can add role to COM+ application, but when I try do same to add new user to role, it say error. Why it is so? Here is the the code:
Sub AddNewUserToRole(Role As COMAdmin.COMAdminCatalogObject, sUser As String, clRoles As COMAdminCatalogCollection)
Dim a As COMAdmin.COMAdminCatalog
Dim b As COMAdminCatalogCollection
Dim c As COMAdminCatalogObject
Dim d
Dim s As String
Dim i As Long
Set b = clRoles.GetCollection("UsersInRole", GetKey(clRoles, "NextTestRole2") 'it works good
b.Populate
Set c = b.Add
c.Value("Name" = "IT-22\Guest" 'here is error
b.SaveChanges
End Sub