Last post Jul 02, 2014 05:29 AM by Michelle Ge - MSFT
Jul 01, 2014 12:00 PM|lankav|LINK
We are working on a asp.net 2.0 website where we are using active directory membership provider for active directory authentication.
We have two providers in the providers section each using a different connection string for different domains.
<add name="Domain1" connectionString="<<Path1>>"/>
<add name="Domain2" connectionString="<<Path2>>"/>
<compilation debug="true" strict="false" explicit="true"/>
<membership defaultProvider ="Domain1_MembershipProvider">
<add name="Domain1_MembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="Domain1" connectionUsername="xxxx" connectionPassword="xxxx"
<add name="Domain2_MembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="Domain2" connectionUsername="xxxx" connectionPassword="xxxx"
When we are trying to create an object for ActiveDirectoryMembershipProvider as below we are getting an error as "Logon failure: unknown user name or bad password"
Dim domainProvider As ActiveDirectoryMembershipProvider = Nothing
domainProvider = TryCast(Membership.Providers("Domain1"), ActiveDirectoryMembershipProvider)
But if we comment out the second provider in the providers section everything works fine. Can you please let us know how can we resolve this issue.
Thanks & Regards,
Jul 01, 2014 12:18 PM|PatriceSc|LINK
Could it be just that the connectionuserName and/or password are wrong for this provider? Have you tried also to comment the first provider rather than the second one? Basically test first each provider separately.
Jul 02, 2014 05:29 AM|Michelle Ge - MSFT|LINK
According to your description and the error message, I think you shoula make sure the UserName and Password is not a valid AD account.
There is a similar thread, please refder to the link below:
For more information about ActiveDirectoryMembershipProvider Class, please refer to the link below:
Hope it's useful for you.