Creating a Password Protected folder with WebsitePanel is easy to do and allows both web, and FTP access to sites with a username and password.
First start by navigating to your user account and select FTP accounts.
From here, create the FTP account:
After typing in your credentials and verifying the password, browse to the directory you want to secure.
And select whether or not you want the user to have Read and/or Write access, and finally Save.
For normal password protected web-folders, disable Write for the user here.
Next, go to Websites and then Select the site you wish to create the Virtual Directory inside of
Select the Virtual Directory Tab and then Create
The Directory Name should match the directory you've already created before now, if you do not have this yet created, it will not create this directory for you, instead it will only exist in configuration. If the directory does exist(highly recommended, as shown below) the required web.config will be created.
The process is the same as adding the FTP Home Folder and should point to the exact same directory:
Please note: You cannot create a Virtual Directory as a subdirectory. It needs to be "top level" even if it actually points to a deeper level directory.
This _can_ lead to 2 different paths pointing to the same file. The Virtual Dir would be protected; the regular directory would not.
Thus: if your site has yoursite.com/this/dir/is/admin/ this would be bad. The entire world would be able to access yoursite.com/this/dir/is/admin/ while still asking for password on yoursite.com/admin/
Ideally it is best to make these one and the same, thus your admin dir should be moved so that virtual dir /admin/ points instead to yoursite.com/wwwroot/admin/
The properties should be as follows to properly secure the dir:
Enable Basic and Integrated authentication. Disable Anonymous Access.
Optionally enable Directory Browsing, if you want an index for the directory.
Further, any other settings can be set here if needed. Then, Update.
This should now allow access to your password protected directory, only for the FTP user you have created.