Utilize Active Directory Provider in ASP.NET 2.0

You can use the System.Web.Security.ActiveDirectoryMembershipProvider class to do Membership against active directory!!!


However, you have to setup a special connection string to point to a domain controller and to run as a user to query LDAP.


I’ll be working with this a little bit later and will likely post the code for this project somewhere…


Here is more info on how to do this:


http://msdn2.microsoft.com/en-us/library/system.web.security.activedirectorymembershipprovider.aspx

How to Setup the Web Site Configuration WebSite outside VS.NET 2005

Here’s how to do it:



  • Copy all files in the C:WindowsMicrosoft.NETFrameworkv2.0.50727ASP.NETWebAdminFiles to a directory inside C:inetpubwwwroot (likely called Admin) – IGNORE the one that is in the inetpubwwwrootaspnet_webadmin…that is a bad copy!!!
  • Go into IIS, make the directory a web application, set it’s asp.net version to 2.0
  • The default.aspx page that normally loads expects the queryString variables of applicationPhysicalPath and applicationURL (as the web application is modifiying membership/roles/profile via the providers and the updating the web.config file of the web application you are pointing it at)!!!
  • You can set this statically in the default.aspx page and have it not care about the queryString variables
  • Then you would want to lock down the web with IIS authentication