IIS Physical Path VS Virtual Path

In this post we will get concept about IIS physical path & virtual path. First of all let’s get 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 are pointed from outside of IIS application folder.

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

iis_0

 

 

 

 

 

 

Add Virtual Directory:

iis_1

 

 

 

 

 

 

 

 

 

 

 

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

 

iis_3

 

 

 

 

 

 

 

 

iis_4

 

 

 

 

 

 

iis_5

 

 

Let’s Enable Directory Browsing:

iis_6

 

 

 

 

 

By default this is disabled for security reason.

iis_7

 

 

 

 

 

 

 

 

 

 

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

iis_8

 

 

 

 

 

 

Click on the file name, it will load the file which is in outer of IIS application folder.
iis_9

Thanks, hope this will help 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *