Sitemap

Redirect from HTTP to HTTPS (IISExpress)

Use KeePass with Pleasant Password Server

The technical steps in this article (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

  • If you want to view current http sites or to remove them, it is possible to use these commands:
    • netsh http show
    • netsh http delete urlacl url=http://YourServerName.YourDomain:80/ user=everyone
  • If the service does not start, check if IISExpress is running, it can be stopped from task manager
  • Double-check that the changes have been applied correctly, right syntax, and the server & port replacements have been made.
  • When making these changes, be sure to stop and re-start the service for the changes to take effect.
  • It is possible to revert to the config file backups you have made, if needed
  • It is possible to run the install to repair Pleasant Password Server, if needed