Hello,
I've been struggling with this issue for a few days and all my googling (and forum searching) hasn't turned up anything that can fix my problem.
We want to setup Forms authentication (NOT windows auth) that will authenticate users against Active Directory, we've been able to successfully use the AD Import tool to create the users in Kentico but we've been unsuccessful in trying to authenticate those users.
Kentico is running in IIS 7 in its own app domain, Integrated mode, .net 4.0, and using the local NETWORK SERVICE account. We've added a proper connection string for AD like so:
<add name="ADConn" connectionString="LDAP://sub.domain.ext/CN=Users,DC=sub,DC=domain,DC=ext" />
I've confirmed through multiple tools that this is the correct usage of the connection string.
We've also setup the membership provider as such:
<add name="ADProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
applicationName="/"
connectionStringName="ADConn"
connectionUsername="sub.domain.ext\connectionUser"
connectionPassword="connUserPassword"
connectionProtection="Secure"
enableSearchMethods="true"
/>
And we've set the defaultProvider to this new "ADLDSProvider" as well, and commented out the default CMSProvider.
Essentially Kentico is unable to authenticate any of the Active Directory users even after they've been given every role. The message given back to the user is "Your login attempt was not successful. Please try again.".
Now, if the AD membership provider or the connection strings are intentionally mis-configured, we will get a nasty "Server Error" page letting us know one of the following messages:
The server is not operational <-- bad server name
Logon failure: unknown user name or bad password <-- incorrect directory path
Logon failure: unknown user name or bad password. <-- incorrect connection un/pw
So we've experienced all of those, what we're having issues with is that when the web.config is configured properly, none of the Active Directory users can log into CMSDesk or CMSSiteManager when everything is telling me that they should be able to. Once configured properly, I get the following message upon every login attempt: "Your login attempt was not successful. Please try again."
At first and after a few different tries you would assume that the user was locked, didn't have enough permissions, or the username was somehow changed during the import process. The last part of that is true but the first few weren't. We've tried the following combinations:
sub.domain.ext\user
user@sub.domain.ext
user
sub.domain.ext-user
SUB\user
SUB-user
Each of those combinations works when logging into any other box in this domain, the ADProvider membership provider is the only membership provider. We seem to think that the SUB-user is the correct combinations as that is how they look in the list of users.
Nothing seems to allow the AD users to log in and I don't see anything in the logs that would tell me otherwise.
So I'm asking for help, are there any tools I could use to figure out what is going on? Am I missing something with this configuration? Anything else I should try?
Thank you all for your help, this has given quite a headache, lol.