To password protect a directory in IIS7 using basic authentication use the following steps.
Note: In this example I will be password protecting http://www.jordanshpere.co.uk/test
1) Create a user using Computer Management
2. Open up Internet Information Services and click on the relevant website under Sites section.
3. Click the directory you want to password protect (test in this case) then select Authentication
4. When in the authentication section "Disable" Anonymous Authentication and "Enable" Basic Authentication.
5. Now we will need to set the permissions on the directory. Right click the website folder (www.jordansphere.co.uk/test) in IIS then select Edit Permissions (or navigate using Windows Explorer). Under Security select Edit -> Add. In the "Enter the object names to select" section put in the username you created earlier ( jordansphere )
7. Now open your web browser and navigate to the URL (www.jordansphere.co.uk/test)
You should get the above box. Enter the username/password entered earlier and you should now have access to your directory and files within.