Password Protecting a Directory in IIS 7

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

iis7_password2

      

2.  Open up Internet Information Services and click on the relevant website under Sites section.

iis7_password1

 

3. Click the directory you want to password protect (test in this case) then select Authentication

iis7_password3

 

4. When in the authentication section "Disable" Anonymous Authentication and "Enable" Basic Authentication

iis7_password4

 

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 )

iis7_password6

7. Now open your web browser and navigate to the URL (www.jordansphere.co.uk/test)

iis7_password7

You should get the above box. Enter the username/password entered earlier and you should now have access to your directory and files within.