- Download secure-folders.zip file and extract the file.
- Open web.config using a text editor and replace the word securefolder on line 12 with the folder name which you need to secure.
- Open the users.xml file located within App_Data directory using a text editor and change the values for the default user.
- Upload the modified files to your website
To secure multiple directories edit the web.config and define new folders as per the example below
<location path="securefolder">
<system.webServer>
<security>
<authorization>
<add accessType="Deny" users="?" />
</authorization>
</security>
</system.webServer>
</location>
Becomes
<location path="securefolder">
<system.webServer>
<security>
<authorization>
<add accessType="Deny" users="?" />
</authorization>
</security>
</system.webServer>
</location>
<location path="securefolder2">
<system.webServer>
<security>
<authorization>
<add accessType="Deny" users="?" />
</authorization>
</security>
</system.webServer>
</location>
To add additional users, define new users as per the example below
<User>
<UserName>joasoap</UserName>
<Password>letmein</Password>
<EMail>[email protected]</EMail>
</User>
Becomes
<User>
<UserName>joasoap</UserName>
<Password>letmein</Password>
<EMail>[email protected]</EMail>
</User>
<User>
<UserName>billybob/UserName>
<Password>letmein</Password>
<EMail>[email protected]</EMail>
</User>