Knowledge Essentials - 3Essentials Hosting

Setting folder as IIS Application

Article ID: 359

 Back to Search

Question:

How do I set a folder on my Windows hosted website as an IIS Application?

Answer:

You may find it necessary to identify a folder as an "application" a.k.a an "IIS Application"... this identifies the folder as an application root, which has ramifications on settings for web-based application (ASP or ASP.net files within that folder).  One good example of the impact of changing a folder to an IIS application, is that as the application root, .NET will check for a web.config file there, as explained in the following article: 

Where does ASP.Net search for web.config file?

To set a folder as an IIS Application, follow these instructions:

  1. Note: these instructions ONLY apply to customers hosted on servers with Plesk 7.5.6 or better.  Customers on 7.0.3 or earlier must submit a support request, and we'll make the change on your behalf.
  2. Note: these instructions ASSUME the physical folder already exists.  I.e., if you want to make www.mydomain.com/myfolder an application, then we're assuming you've already created a physical folder called "myfolder" under your httpdocs directory.
  3. Log into your Control Panel
  4. Click on the Domain
  5. Click on the WebDirectories icon
  6. When the WebDirectories screen loads, you are in the website root, illustrated at the top by "/".  "/" equates to the "website root".   The WebDirectories page will show all of the physical and virtual folders in the website root.   You need to navigate to the location where your physical folder exists...
    • If the folder you want to make an application is off the root, you should be able to see it listed on this page... i.e., the physical directory www.mydomain.com/myfolder would show up on the WebDirectories page when viewing the "/" (root) of the site. 
    • If the folder you want to make an application is off a different folder, you should click thru the subfolders as necessary until the physical folder is displayed in the list of folders.  For example, if www.mydomain.com/myfolder/hisfolder is the folder you want to make an application, in webdirectories, you would click on the myfolder physical folder to see it's contents, which would include the hisfolder as a subfolder.  Don't click down into "hisfolder", stay a the "myfolder" level.
  7. Now that you've navigated to the correct location, click the ADD NEW VIRTUAL DIRECTORY icon.
  8. On the ADD NEW VIRTUAL DIRECTORY ICON:
    • Name: put the name of the physical directory we wanted to make an application... in our examples above, we'd either put "myfolder" or "hisfolder".
    • Path: put the path to the physical directory we wanted to make an application... in our examples above, we'd either put "/httpdocs/myfolder" or "/httpdocs/myfolder/hisfolder"
    • Set virtual directory permissions, if you aren't sure, you typically should ONLY enable "Read Permission" and "Log visits" per the default.  Changing these settings may increase security risks to your site and data. Be sure you understand the ramifications of changing these before you do.
    • Application Settings:
      • Check the box to CREATE APPLICATION. 
      • Execute Permissions: if you're unsure, leave at SCRIPTS ONLY.  Changing these settings may increase security risks to your site and data. Be sure you understand the ramifications of changing these before you do.
    • Click OK.
  9. You will get an INFORMATIONAL message (not an error) that indicates "Physical directory with such name already exists.  If you continue, it will become inaccessible.  Do you want to proceed?"  Click OK.  The physical folder will become inaccessible, but it will now be accessible by it's virtual name... i.e., it's the same thing, because we set the virtual dir name to the same as the physical dir name.   If you did not get this message, than either the physical directory did not exist BEFORE you started this (as noted at the beginning, we assumed you already had a folder there with this name), or you possible made some other error.  Submit a support request if you need assistance further.
  10. Your "webdirectory" has now been successfully created.

ADVANCED USER NOTES: 

  • A virtual directory does not have to be set as an IIS application to be usable as a virtual directory.  I.e., all virtual directories are not IIS applications, but all IIS Applications are virtual directories. In Plesk, this is the only way to enable the IIS Application setting on a folder, i.e., to create the virt dir, and enable IIS Application on it.
  • A virtual directory does not have to be configured to point to a physical folder of the same name... for example, you could create a virtual directory called BOB that pointed to httpdocs/john.  That means that the contents of the physical folder httpdocs/john would actually be accessible via the web by www.mydomain.com/BOB.   I.e., a virtual folder points to any physical folder you want it to.

 

 
Downloads Associated With This Article
No downloads are currently associated with this article.