virtual directories/physical directories in IIS

Discussion in 'ASP .Net' started by Paul F, Jun 25, 2008.

  1. Paul F

    Paul F Guest

    Im confused about the difference(s) between virtual directories and
    physical
    directories in IIS.

    Any ideas?



    *** Sent via Developersdex http://www.developersdex.com ***
    Paul F, Jun 25, 2008
    #1
    1. Advertising

  2. A physical directory, i.e., a directory in your hard drive, can be pointed to by
    IIS to configure a virtual directory, i.e., a directory that anybody can access
    from outside your computer via http.



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "Paul F" <> wrote in message news:%...
    > Im confused about the difference(s) between virtual directories and
    > physical
    > directories in IIS.
    >
    > Any ideas?
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Juan T. Llibre, Jun 25, 2008
    #2
    1. Advertising

  3. Paul F

    Paul F Guest

    May be my question wasnt quite clear, In Microsoft Internet Manager,
    which
    is the UI for IIS you can have physical and virtual directories inside
    the
    default web site, i want to know the difference between the two
    structures
    there



    *** Sent via Developersdex http://www.developersdex.com ***
    Paul F, Jun 25, 2008
    #3
  4. re:
    !> you can have physical and virtual directories inside the default web site

    You can not only have them inside the default website,
    but you can also have them inside any web application.

    I assume that you mean something like this :

    --root directory
    -- physical subdirectory of the root which is not configured as a virtual directory
    -- physical subdirectory of the root which *is* configured as a virtual directory

    Basically, the difference is that any web.config in a physical subdirectory cannot
    contain references to MachineToApplication configuration sections, while in
    virtual directories you can override MachineToApplication configuration sections.

    To see which configuration sections are MachineToApplication ones, open the file machine.config.comments
    with Notepad, or any other pure text editor, and search for the text "MachineToApplication".

    Those configuration sections can only be configured when the application's web.config is in a
    directory configured as a virtual directory, and cannot be configured in physical subdirectories.

    Any section in machine.config marked as "MachineToWebRoot" can only be configured in the Application's root.
    Any section in machine.config marked as "MachineOnly" can only be configured once for the whole server.



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "Paul F" <> wrote in message news:...
    > May be my question wasnt quite clear, In Microsoft Internet Manager,
    > which is the UI for IIS you can have physical and virtual directories inside
    > the default web site, i want to know the difference between the two structures there
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Juan T. Llibre, Jun 25, 2008
    #4
  5. A physical directory is a directory that exists under the directory that the
    web site is bound to. For example: inetpub\wwwroot (url would be
    http://localhost) is the location the web site is pointing to.
    inetpub\wwwroot\mydirectory is physically under that directory (url would be
    http://localhost/mydirectory).

    A virtual directory could be any directory that can be seen by the server.
    let's say you had a bunch of files in a directory called d:\myfiles. You can
    create a virtual directory called MyFiles in your web site (url would be
    http://localhost/myfiles). To anyone browsing to that directory through the
    web site, it behaves as if it's located within the web.

    Easiest way to think of it is a shortcut folder for web servers.

    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - Expression

    "Paul F" <> wrote in message
    news:#...
    > Im confused about the difference(s) between virtual directories and
    > physical
    > directories in IIS.
    >
    > Any ideas?
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Mark Fitzpatrick, Jun 25, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeffry van de Vuurst
    Replies:
    2
    Views:
    510
    Jeffry van de Vuurst
    Jul 30, 2003
  2. Jerry Morton
    Replies:
    1
    Views:
    561
    Mohamed El Ashmawy
    Oct 14, 2004
  3. =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=

    Multiple bin-directories with virtual directories?

    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    811
    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=
    Nov 9, 2004
  4. DagoFlores

    Geting physical path of IIS directories

    DagoFlores, Sep 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,203
    DagoFlores
    Sep 19, 2005
  5. =?Utf-8?B?SmVmZiBCZWVt?=

    physical path to virtual path under virtual directory

    =?Utf-8?B?SmVmZiBCZWVt?=, Aug 1, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    1,020
    Eliyahu Goldin
    Aug 1, 2007
Loading...

Share This Page