I am trying to create a secure page and I would like to use Active Directory to authenticate users.I am really new to this and I would like to get some help from you experts.what are the steps that I need to follow to get this working. I would like the users to enter their Ad account user Id and password and then the page will be redirected to the secured page. My web config file look like the one on below. please your help is really appreciated.
Code:
<configuration>
<connectionStrings>
<add name="ADConnectionString" connectionString="LDAP://ad.xx.xxxxx.xx.xx:350/DC=ad,DC=xxx,DC=xxxxx,DC=xx,DC=xx"/>
</connectionStrings>
<system.web>
<compilation debug="true"/>
</system.web>
<system.web>
<authentication mode="Forms">
<forms name=".ASPNET" loginUrl="logon.aspx" defaultUrl="secure/default.aspx" />
</authentication>
</system.web>
<location path="secure">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
<allow roles="secure" />
</authorization>
</system.web>
</location>
<system.web>
<membership>
<providers>
<add connectionStringName="ADConnectionString"
connectionUsername="ldapbr"
connectionPassword="ldapbr"
attributeMapUsername="sAMAccountName"
name="MembershipADProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
</system.web>
</configuration>