dynamic tools for .net developers™  LaMarvin Home
home » constable » faq » com+ roles

How to use CAZE with COM+ roles

In order to use a COM+ role for authorization checking with CAZE, you have to add a ComPlusRole instance to the authorization policy and make sure that you set the ComPlusRole.ComPlusRoleName property of the role to the name of the COM+ role as the following sample code illustrates:
[Visual Basic]
Imports LaMarvin.Constable
Imports LaMarvin.Constable.Model

Dim policy As New Policy

policy.Roles.Add(New ComPlusRole("Creator", "COM+ Creators"))
policy.Roles.Add(New ComPlusRole("Remover", "COM+ Removers"))

using LaMarvin.Constable;
using LaMarvin.Constable.Model;

AuthorizationPolicy policy = new AuthorizationPolicy();

policy.Roles.Add(new ComPlusRole("Creator", "COM+ Creators"));
policy.Roles.Add(new ComPlusRole("Remover", "COM+ Removers"));
Now membership to the Creator role will be resolved by COM+ as membership to the COM+ Creators role. Similarly, membership to the Remover role will be resolved by COM+ as membership to the COM+ Removers role.

See also the CAZE role resolution process for more information.

© 2002-2007 LaMarvin. All Rights Reserved.     [Terms of use]     [Privacy] This site doesn't open new browser windows.