IIS Physical Path VS Virtual Path

First of all, let’s get the overview of both.

  • Physical path
    This is the actual path the file is located by IIS.

  • Virtual path
    This is the logical path to access the file which is pointed to from outside of the IIS application folder.

    Let’s display this image from Hard-drive ‘E:’ using a virtual directory in IIS default web site.


Add Virtual Directory





Here, we need to provide an alias for the physical path.

Physical Path - E:\Files
Virtual Path - http://localhost/Files/
File Name - image_60140ec0-ce46-4dbf-a14f-4210eab7f42c.png
Full Path - http://localhost/Files/image_60140ec0-ce46-4dbf-a14f-4210eab7f42c.png







Let’s enable the Directory Browsing.



By default, this is disabled for security reasons.




Here, we can see the files of the folder that is in E Drive



Click on the file name. It will load the file which is in the outer part of IIS application folder.



Thanks, hope this will help.