Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to work with LDAP 1

Status
Not open for further replies.

taree

Technical User
May 31, 2008
316
US
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>
 
jbenson001 thanks for the reply.I did check that and I am still not able to access the secure page.Will it help if I post the web.config file....I do not really know why it is not working..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top