I have a login in page which authenticates against an Active Directory. It works well until I authenticate to a subdirectory (named "policies").
Here is my relevant code from my web.config:
Here is my login code:
Any ideas as to why I can't authenticate to subdirectories would be greatly appreciated.
Here is my relevant code from my web.config:
Code:
...
<system.web>
<authentication mode="Forms">
<forms name=".ADAuthCookie" timeout="10" />
</authentication>
</system.web>
<location path="policies">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
Code:
Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim domainProvider As MembershipProvider = Membership.Providers("AspNetActiveDirectoryMembershipProvider")
If domainProvider.ValidateUser(txtUName.Text, txtPassword.Text) Then
FormsAuthentication.SetAuthCookie(txtUName.Text, False)
Response.Redirect("policies/testing.aspx")
Else
Response.Write("Invalid UserID and Password")
End If
End Sub
Any ideas as to why I can't authenticate to subdirectories would be greatly appreciated.