Re: AD Login failure when using ActiveDirectoryMembershipProvider
- From: "Patrick.O.Ige" <naijacoder@xxxxxxxxxxx>
- Date: Fri, 23 Feb 2007 09:48:14 +1100
hm.. Craig maybe what they mean is that if you want to use the process
identity to connect then use
<identity impersonate="true" /> with your username and passoword
Patrick
"Craig Wagner" <MSDNNospam207@xxxxxxxxxxxxx> wrote in message
news:537464B9-82F0-44AA-B217-B197973D7C55@xxxxxxxxxxxxxxxx
Here's my configuration:
- ASP.NET application
- Windows XP Pro running IIS
-Vdir is configured to allow anonymous access
- Anonymous access account is my domain account (for testing purposes it's
quicker and easier to do this than to try to get another domain account
set
up)
- Web application has impersonation turned on (i.e. <identity
impersonate="true" />)
My web.config contains:
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider...
connectionStringName="ADService"
connectionProtection="Secure"
attributeMapUsername="sAMAccountName"
/>
</providers>
</membership>
With the above configuration, when I hit the following line of code I get
an
exception of "Logon failure: unknown user name or bad password."
Membership.ValidateUser( txtUsername.Text, txtPassword.Text );
If I change the web.config to the following, it works.
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider...
connectionStringName="ADService"
connectionUsername="mydomainaccount"
connectionPassword="mydomainpassword"
connectionProtection="Secure"
attributeMapUsername="sAMAccountName"
/>
</providers>
</membership>
What has me baffled is that everything I've read says that if you don't
supply the connectionUsername and connectionPassword it will use the
process
identity to connect to AD. The process identity SHOULD be my domain
account,
because that's the anonymous access account and impersonation is turned
on,
and it obviously works when I use my domain account credentials.
.
- Prev by Date: Re: WindowsTokenRoleProvider & Domain Groups
- Next by Date: Re: AD Login failure when using ActiveDirectoryMembershipProvider
- Previous by thread: Re: 2 membership databases
- Next by thread: Re: AD Login failure when using ActiveDirectoryMembershipProvider
- Index(es):
Relevant Pages
|