Re: Membership provider with ADAM
- From: "Joe Kaplan \(MVP - ADSI\)" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Dec 2005 11:06:26 -0600
Have you used a tool like ldp.exe (which came with ADAM) to try to bind to
the directory using that user? Did you make sure you enabled the user?
I'm not really up on the AD membership provider stuff yet, but I know the
underlying plumbing pretty well. Unfortunately, the operations error is
pretty generic and the stack trace doesn't tell us where it was generated.
Joe K.
"Bais" <Bais@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D33222A6-44B5-4AF8-BA0E-AB471B995334@xxxxxxxxxxxxxxxx
> I'm trying to use ADAM as the membership provider for my app. I've created
> a
> new adam instance with O=test and I imported all the four ldf-files during
> the install. I added the following to my web.config:
> <connectionStrings>
> <add name="ADAMServerLDAP"
> connectionString="LDAP://localhost:50000/OU=Users,O=test"/>
> </connectionStrings>
> ...
> <membership defaultProvider="MembershipADProvider">
> <providers>
> <add name="MembershipADProvider"
> type="System.Web.Security.ActiveDirectoryMembershipProvider,
> System.Web, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="ADAMServerLDAP"
> connectionProtection="None"
> description="Some description."
> connectionUsername="CN=Admin,O=test"
> connectionPassword="Abcd1234!"
> applicationName="MyApp"
>
>
> enablePasswordReset="false"
> enableSearchMethods="true"
> requiresQuestionAndAnswer="false"
> requiresUniqueEmail="false"
>
> maxInvalidPasswordAttempts = "5"
> passwordAttemptWindow = "10"
> passwordAnswerAttemptLockoutDuration = "30"
>
> minRequiredPasswordLength = "7"
>
> attributeMapUsername="userPrincipalName"
> attributeMapEmail="mail"
>
> attributeMapFailedPasswordAnswerCount="badPwdCount"
> attributeMapFailedPasswordAnswerTime="badPasswordTime"
> attributeMapFailedPasswordAnswerLockoutTime="lockoutTime"
>
> />
>
> </providers>
> </membership>
>
> I used ASDI Edit to add the organizational unit "Users".
> I also added an admin user with a password of "Abcd1234!" as you can see.
>
> When I try to use the ASP.NET Web Site Administration Tool I can open the
> create user dialog, but when I try to save the user, I get a large error
> message :
>
> An error was encountered. Please return to the previous page and try
> again.
> The following message may help in diagnosing the problem: Exception has
> been
> thrown by the target of an invocation. at
> System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[]
> arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
> RuntimeTypeHandle typeOwner) at
> System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
> arguments, Signature sig, MethodAttributes methodAttributes,
> RuntimeTypeHandle typeOwner) at
> System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
> Boolean
> skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object
> obj, BindingFlags invokeAttr, Binder binder, Object[] parameters,
> CultureInfo
> culture) at
> System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String
> methodName, Object[] parameters, Type[] paramTypes) at
> System.Web.Administration.WebAdminMembershipProvider.CreateUser(String
> username, String password, String email, String passwordQuestion, String
> passwordAnswer, Boolean isApproved, Object providerUserKey,
> MembershipCreateStatus& status) 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)
>
>
>
> I tried to use the Membership API directly:
> MembershipUser user = Membership.CreateUser("Some User", "Abcd1234!",
> "nomail@xxxxxxx");
>
> When doing this I can catch the TargetInvocationException and the message
> in
> the internalexception is:
> An operations error occurred. (Exception from HRESULT: 0x80072020)
>
> Anybody have any ideas to what might be wrong?
.
- References:
- Membership provider with ADAM
- From: Bais
- Membership provider with ADAM
- Prev by Date: Re: Impersonation headaches with ASP.NET 2.0 -- help!
- Next by Date: Error in accessing shared folder database file in ASP.net
- Previous by thread: Membership provider with ADAM
- Next by thread: Session being crossed
- Index(es):
Relevant Pages
|