Is there a way to install lightweight Active Directory on Windows 7 for Development purposes without domain? I've downloaded the "AD LDS" for Windows 7 and installed it but it seems to require a actual domain server exist on the network. Isn't it possible to run a active directory on the domain called "localhost" ?
To answer the original question, you can install ADLDS for W7 without a domain present. A workgroup W7 machine will suffice. It need not be a domain member. The http://technet.microsoft.com/en-us/library/cc731246(WS.10).aspx step by step guide might be useful to you.
ADLDS is a LDAP server and if your requirements are to test code for reading/writing LDAP intended for AD, then you could test againt ADLDS. You might find the http://directoryprogramming.net/ site and accompanying book useful.
If your requirements are more than simply a LDAP server, then as per Shane's recommendation you'd need to implement a lab environment with full AD installation.
If you're looking to develop against something that looks and smells like Active Directory, then AD LDS is no substitute - contrary to what you'd intuitively think from the name, it does not provide just a "slimmed down" AD.
Create a development domain with a real AD Domain Services install.
The AD LDS for windows 7 installation adds three components to your Administrator Tools which are:
Use the last one to create a local instance of an Active Directory for your dev :)