Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   How to get VirtualDir name from Application_onStart ? (http://www.velocityreviews.com/forums/t797380-how-to-get-virtualdir-name-from-application_onstart.html)

F C 12-16-2004 03:10 PM

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 12-18-2004 09:11 AM

Re: How to get VirtualDir name from Application_onStart ?
 
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

F C 12-21-2004 04:17 PM

Re: How to get VirtualDir name from Application_onStart ?
 

"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:
>
> > 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 12-21-2004 04:42 PM

Re: How to get VirtualDir name from Application_onStart ?
 
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...
>> 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

>
> 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.
>
>





All times are GMT. The time now is 04:37 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.