1. Download secure-folders.zip file and extract the file.
  2. Open web.config using a text editor and replace the word securefolder on line 12 with the folder name which you need to secure.
  3. Open the users.xml file located within App_Data directory using a text editor and change the values for the default user.
  4. Upload the modified files to your website
Advanced Options
 
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>
Was this answer helpful? 0 Users Found This Useful (1 Votes)