How to password protect a website or folder on IIS

  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>
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset or change your email password from SolidCP

Follow the steps below to change an email password that is hosted on our Windows SSD Hosting...

Email Password Complexity Requirements

For your security and the security of other users hosted on our Windows SSD Web Hosting...

How to Set Website Permissions + Write Permissions

How to set website write permissions using the Windows Hosting Control Panel. Log into the...

URL redirect rule to redirect all website traffic from http to https

This knowledgebase article applies to Windows Hosting only, below are the Linux instructions...

How to connect to your MSSQL databases from your website + using SQL Server Management Studio

How to remotely connect to a Microsoft SQL Database Preamble : In order to connect to a...