How to get VirtualDir name from Application_onStart ?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > How to get VirtualDir name from Application_onStart ?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to get VirtualDir name from Application_onStart ?  
F C


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-17-04 12:39 AM

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.








[ Post a follow-up to this message ]



    Re: How to get VirtualDir name from Application_onStart ?  
Adrienne Boswell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-18-04 12:46 PM

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





[ Post a follow-up to this message ]



    Re: How to get VirtualDir name from Application_onStart ?  
F C


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10:55 PM


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







[ Post a follow-up to this message ]



    Re: How to get VirtualDir name from Application_onStart ?  
Mark Schupp


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10: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.
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:05 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register