Setting up a Virtual Directory in IIS

You may have a need to server files over http. Here’s how you can achieve this via Virtual Directory.

  1. If you’re wanting authentication via username and password before allowing access to the files over http, set up a user for accessing these files in User Manager. T
  2. Right click the folder you’re wanting to share over http and set permission for Read to the user you created above, IUSR and IIS_USRS.
  3. Right click your website root in IIS Manager and select Add Virtual Directory
  4. Pick an Alias (this will be the ‘stub’ of the http address – e.g. https://yoursite/files) and pick the path to the folder you wish to share.
  5. If you are adding authentication, ensure Application User is selected in Connect As
  6. Once created, right click the virtual directory and select Convert to Application
  7. Now select the application and double click Authentication. Disable Anonymous Authentication and enable Basic Authentication.
  8. You need to set up the Mime Types to enable download of files. Select the application you’ve just made and click Mime Types under IIS
  9. If you need to add a catch-all file extension, create a new Mime Type with File Extension = “.*” and Mime Type = “application/octet-stream”

And that’s it!

About stigzler 42 Articles
Chief crook and wattle bosher.

Be the first to comment

Leave a Reply

Your email address will not be published.


*