|
Home > Archive > IIS ASP > December 2004 > How to get VirtualDir name from Application_onStart ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to get VirtualDir name from Application_onStart ?
|
|
|
| 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.
| |
| Adrienne Boswell 2004-12-18, 7:46 am |
| Gazing into my crystal ball I observed "F C" <corebridge@wanadoo.nospam.fr>
writing in news:esBlFm44EHA.1400@TK2MSFTNGP11.phx.gbl:
> 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" <arbpen2003@sbcglobal.net> a écrit dans le message news:
Xns95C3C1D2886Farbpen2003sbcglobaln@64.164.98.7...
> Gazing into my crystal ball I observed "F C"
<corebridge@wanadoo.nospam.fr>
> writing in news:esBlFm44EHA.1400@TK2MSFTNGP11.phx.gbl:
>
> <% 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 2004-12-21, 5:55 pm |
| 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" <corebridge@wanadoo.fr.nospam> wrote in message
news:OMp%23Qh35EHA.2012@TK2MSFTNGP15.phx.gbl...
>
> "Adrienne Boswell" <arbpen2003@sbcglobal.net> a écrit dans le message
> news:
> Xns95C3C1D2886Farbpen2003sbcglobaln@64.164.98.7...
> <corebridge@wanadoo.nospam.fr>
>
> 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.
>
>
|
|
|
|
|