Having issues with trying to get forms authentication working with AD. I've set up everything as follows, but get a 401 error when accessing the Login.aspx page
From my Web.config:
<connectionStrings>
<add name="ADService" connectionString="LDAP://dc.domain.com/CN=Users,DC=domain,DC=com"/>
</connectionStrings>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" />
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
<membership defaultProvider="MyADMembershipProvider">
<providers>
<clear/>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADService"
attributeMapUsername="sAMAccountName"
connectionUsername="domain\username"
connectionPassword="password"
connectionProtection="None"
enableSearchMethods="true"/>
</providers>
</membership>
This is all running on a Windows 2008 server with IIS7. I have the app pool set to .net version 4.0, integrated. When I test the pass-through authentication, it passes. The only authentication method enabled is Forms Authentication. The site works fine if I switch to Windows Authentication, I just can't seem to get Forms Authentication working. If I enter the domain URL in the browser, it redirects to Login.aspx?ReturnUrl=%2f and displays a 401 error, same thing if I try to navigate directly to login.aspx. I can't seem to find any indication of a problem in any of the server logs. Any ideas on what I might be missing?