How to get VirtualDir name from Application_onStart ?

Discussion in 'ASP General' started by F C, Dec 16, 2004.

  1. F C

    F C Guest

    Hello,

    I would like to find the virtual directory name from within
    Application_onStart in global.asa.
    I am in ASP, not ASPX. I have no server.AppPath.

    Thanks for your help.

    François.
    F C, Dec 16, 2004
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed "F C" <>
    writing in news::

    > Hello,
    >
    > I would like to find the virtual directory name from within
    > Application_onStart in global.asa.
    > I am in ASP, not ASPX. I have no server.AppPath.
    >
    > Thanks for your help.
    >

    <% For Each strKey In Request.ServerVariables %>
    <%= strKey %> = <%= Request.ServerVariables(strKey) %><br />
    <% next %>

    will give you all the server variables, and the one you want, IIRC, is
    APPL_PHYSICAL_PATH

    --
    Adrienne Boswell
    Please respond to the Group so others can share
    Adrienne Boswell, Dec 18, 2004
    #2
    1. Advertising

  3. F C

    F C Guest

    "Adrienne Boswell" <> a écrit dans le message news:
    Xns95C3C1D2886Farbpen2003sbcglobaln@64.164.98.7...
    > Gazing into my crystal ball I observed "F C"

    <>
    > writing in news::
    >
    > > Hello,
    > >
    > > I would like to find the virtual directory name from within
    > > Application_onStart in global.asa.
    > > I am in ASP, not ASPX. I have no server.AppPath.
    > >
    > > Thanks for your help.
    > >

    > <% For Each strKey In Request.ServerVariables %>
    > <%= strKey %> = <%= Request.ServerVariables(strKey) %><br />
    > <% next %>
    >
    > will give you all the server variables, and the one you want, IIRC, is
    > APPL_PHYSICAL_PATH
    >
    > --
    > Adrienne Boswell
    > Please respond to the Group so others can share


    The Request object is not available in Application_onStart. And I must
    process the virtual dir name in Application_onStart before any client has a
    chance to connect to my server.

    Thanks.
    F C, Dec 21, 2004
    #3
  4. F C

    Mark Schupp Guest

    You have 2 choices that I can see.

    1. hardcode the virtual directory name in global.asa or in a settings file
    that global.asa can read.
    2. get the virtual directory name in the session_onstart subroutine on the
    first request from the first client.

    --
    --Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com

    "F C" <> wrote in message
    news:OMp%...
    >
    > "Adrienne Boswell" <> a écrit dans le message
    > news:
    > Xns95C3C1D2886Farbpen2003sbcglobaln@64.164.98.7...
    >> Gazing into my crystal ball I observed "F C"

    > <>
    >> writing in news::
    >>
    >> > Hello,
    >> >
    >> > I would like to find the virtual directory name from within
    >> > Application_onStart in global.asa.
    >> > I am in ASP, not ASPX. I have no server.AppPath.
    >> >
    >> > Thanks for your help.
    >> >

    >> <% For Each strKey In Request.ServerVariables %>
    >> <%= strKey %> = <%= Request.ServerVariables(strKey) %><br />
    >> <% next %>
    >>
    >> will give you all the server variables, and the one you want, IIRC, is
    >> APPL_PHYSICAL_PATH
    >>
    >> --
    >> Adrienne Boswell
    >> Please respond to the Group so others can share

    >
    > The Request object is not available in Application_onStart. And I must
    > process the virtual dir name in Application_onStart before any client has
    > a
    > chance to connect to my server.
    >
    > Thanks.
    >
    >
    Mark Schupp, Dec 21, 2004
    #4
    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. yop
    Replies:
    4
    Views:
    434
  2. Shiv Kumar

    Global - Application_OnStart question

    Shiv Kumar, Jan 13, 2004, in forum: ASP .Net
    Replies:
    19
    Views:
    748
    Shiv Kumar
    Jan 14, 2004
  3. Marek

    Application_OnStart event

    Marek, May 9, 2004, in forum: ASP .Net
    Replies:
    8
    Views:
    479
    Scott Allen
    May 11, 2004
  4. =?Utf-8?B?QmlsbCBIZWNrbGU=?=

    Application_OnStart

    =?Utf-8?B?QmlsbCBIZWNrbGU=?=, Aug 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    339
    =?Utf-8?B?QnJhZCBRdWlubg==?=
    Aug 16, 2004
  5. =?Utf-8?B?TWlrZSBMb2dhbg==?=

    HTTP Module attaching to Application_OnStart

    =?Utf-8?B?TWlrZSBMb2dhbg==?=, Dec 17, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    4,682
    Steven Cheng[MSFT]
    Dec 31, 2004
Loading...

Share This Page