How to Create a Virtual Directory in IIS

< Back
You are here:

How to Create a Virtual Directory in IIS


The Error – “Server error in ‘\’ application — run-time error” error occurs when the directory being used for IDAutomation’s Barcode Streaming Server for IIS or any .aspx page utilizing IDAutomation’s ASP.NET Server Controls is not set up as a virtual directory under IIS with the ability to run applications. The .aspx page and associated DLLs cannot simply be run out of a subdirectory set up in the root directory of the web server. A virtual directory must be created in IIS.


Create a virtual directory using IIS, mapped to the directory storing the IDAutomation Server Control files.

A virtual directory under IIS needs to be created from an existing directory. If the directory does not exist, create one using My Computer or Windows Explorer. To create a virtual directory, follow these steps:

  • Open the IIS Management Console. This tool can be found under Administrative Tools.
  • Right-click on the website where the directory is needed.
  • Choose New – Virtual Directory.
    iis new virtual directory
  • When asked for the Alias name, enter the name of the directory. The user would type this name into the browser. For example,
  • When asked to grant permissions to the directory, choose the default permissions of Read and Run Scripts.
  • After the Virtual Directory is created, the folder should appear differently in the IIS Management Console.
    iis virtual directory created
  • If problems still occur, stop and restart IIS and ensure it is set to run applications.