Redirect from HTTP to HTTPS (IISExpress)

The technical steps in this artical (below) are for IISExpress, which is included with the default installation.

For Hosting with IIS:

Alternate methods:

Technical Steps

Method 1: To make these changes, follow the instructions below (being sure to replace YourServerName.YourDomain, and port 10001):

  1. Stop the Password Server service.

  2. Run Command Prompt (as Administrator):

    netsh http add urlacl url=http://YourServerName.YourDomain:80/ user=everyone

  3. Make a backup of this file, and open to make a change:

    C:\ProgramData\Pleasant Solutions\Password Server\IISExpress\PleasantPasswordManagerHost.config

  4. Add the following line to the binding section of the PleasantPasswordServer site:

    <binding protocol="http" bindingInformation="*:80:YourServerName.YourDomain" />

  5. Make a backup of this file, and open to make a change:

    C:\Program Files (x86)\Pleasant Solutions\Pleasant Password Server\www\Web.config

  6. Replace the existing rule for "HTTP to HTTPS redirect" with this:

    <rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}:10001/{R:1}" appendQueryString="true"/>
    </rule>

  7. (if necessary) Add firewall rules for port 80 & 10001 (or the port you plan to use instead of 10001)
  8. Start the Password Server service.
  9. (see the Troubleshooting Tips / Reverting below)


Please Note: All changes to Config files will be over-written on Version Upgrades / Installation, and will need to be re-applied (along with any other config file changes). However, Step 2 changes will not need to be repeated.

Troubleshooting Tips / Reverting