1.修改web.config 加入
<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://Lifeacademy.org/DC=Lifeacademy,DC=org"/>
</connectionStrings>
<system.web>
<membership defaultProvider="MyADMembershipProvider">
<providers>
<add
name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
connectionUsername="laaspnet"
connectionPassword="laaspnet000"
attributeMapUsername="SAMAccountName"
/>
</providers>
</membership>
2.參考加入System.DirectoryServices
3.網頁加入login控制項
沒有留言:
張貼留言