map virtual directory to simple name

Discussion in 'ASP .Net' started by Loane Sharp, Apr 22, 2006.

  1. Loane Sharp

    Loane Sharp Guest

    Hi there

    I have an ASP.NET web application created in Visual Studio 2005. The
    application is installed to a subdirectory in wwwroot, which is mapped in
    turn to a virtual directory under the Default Web Site. I would like to load
    the application in the browser using a simple name, e.g. http://test rather
    than http://localhost/test. Is there a way to map a virtual directory to
    such a simple name from within the Visual Studio 2005 web setup project?
    Also, is there a way to (a) enable default documents in the Default Web Site
    and (b) add a particular .aspx page name and extension to the Default
    Documents list (again from within the VS 2005 setup project)?

    Best regards
    Loane
     
    Loane Sharp, Apr 22, 2006
    #1
    1. Advertising

  2. http://test is a domain (or web site) URL, while http://localhost/test is a
    directory name under a different domain (or web site). Assuming that you
    have two domains (or web sites), "test" and "localhost," they might
    conceivably point to the same virtual directory. It might be possible to use
    DNS or the IIS metabase to obtain a list of all domains or web sites on the
    server, and it might be possible to map each domain or web site to a virtual
    or physical directory, but I have a feeling that you're asking the wrong
    question.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Numbskull

    Hard work is a medication for which
    there is no placebo.

    "Loane Sharp" <> wrote in message
    news:%...
    > Hi there
    >
    > I have an ASP.NET web application created in Visual Studio 2005. The
    > application is installed to a subdirectory in wwwroot, which is mapped in
    > turn to a virtual directory under the Default Web Site. I would like to
    > load the application in the browser using a simple name, e.g. http://test
    > rather than http://localhost/test. Is there a way to map a virtual
    > directory to such a simple name from within the Visual Studio 2005 web
    > setup project? Also, is there a way to (a) enable default documents in the
    > Default Web Site and (b) add a particular .aspx page name and extension to
    > the Default Documents list (again from within the VS 2005 setup project)?
    >
    > Best regards
    > Loane
    >
     
    Kevin Spencer, Apr 22, 2006
    #2
    1. Advertising

  3. Loane,

    follow the instructions given by Scott Guthrie in this blog :

    http://weblogs.asp.net/scottgu/archive/2005/11/21/431138.aspx

    It's a real simple, although not very well known, workaround.



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "Loane Sharp" <> wrote in message
    news:%...
    > Hi there
    >
    > I have an ASP.NET web application created in Visual Studio 2005. The application is installed to a
    > subdirectory in wwwroot, which is mapped in turn to a virtual directory under the Default Web
    > Site. I would like to load the application in the browser using a simple name, e.g. http://test
    > rather than http://localhost/test. Is there a way to map a virtual directory to such a simple name
    > from within the Visual Studio 2005 web setup project? Also, is there a way to (a) enable default
    > documents in the Default Web Site and (b) add a particular .aspx page name and extension to the
    > Default Documents list (again from within the VS 2005 setup project)?
    >
    > Best regards
    > Loane
    >
     
    Juan T. Llibre, Apr 22, 2006
    #3
    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. Jack Wright
    Replies:
    1
    Views:
    470
    sonikchopra
    Apr 19, 2005
  2. Steve Singer
    Replies:
    0
    Views:
    542
    Steve Singer
    Feb 15, 2005
  3. =?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,047
    Eliyahu Goldin
    Aug 1, 2007
  4. Kai-Uwe Bux
    Replies:
    1
    Views:
    1,150
    Kai-Uwe Bux
    Dec 21, 2008
  5. rockdale

    include virtual in virtual directory?

    rockdale, Sep 3, 2008, in forum: ASP General
    Replies:
    3
    Views:
    445
    rockdale
    Sep 4, 2008
Loading...

Share This Page