Hi all,

Take 2.

I am using ADAM, which is lightweight Active Directory Application Mode, to 
store both users and 
roles using the role and membership providers from ASP.Net. I have created an 
Authorisation 
Store for storing the roles, and I have a user container for all the users, 
which I can see when I 
use ADSI Edit.

When I use the Web Administration Tool, I am able to create a user using the 
wizard (which 
ignores roles) and I am able to add roles successfully via the Create Role 
link. But when I try to 
create a user using the create user link, it crashes with the following 
exception:

Exception has been thrown by the target of an invocation. at 
System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean 
isMembership, 
String methodName, Object[] parameters, Type[] paramTypes) at 
ASP.security_users_adduser_aspx.UpdateRoleMembership(String u, CheckBox box) in 
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 63 at 
ASP.security_users_adduser_aspx.UpdateRoleMembership(String u) in 
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 52 at 
ASP.security_users_adduser_aspx.CreatedUser(Object sender, EventArgs e) in 
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 13 at 
System.Web.UI.WebControls.CreateUserWizard.OnCreatedUser(EventArgs e) at 
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at 
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs
 e) 
at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) 
at 
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, 
EventArgs e) at 
System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, 
EventArgs 
args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) 
at 
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at 
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at 
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
(String eventArgument) at 
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler 
sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent
(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean 
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

The User does get created, but it's the adding and removing of roles for that 
user that causes the 
problem. I believe this is because there is currently no way to reference the 
user objects from 
within the authorization store. This is the bit I'm missing - how to create a 
link between the 
authorization store and the users OU.

On further research it has been suggested that ADAM can't be used for both 
roles and users 
without writing my own custom provider. If anyone has any further info on this 
it would be helpful.

Regards,
Tony

Reply via email to