Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to get VirtualDir name from Application_onStart ?

Reply
Thread Tools

How to get VirtualDir name from Application_onStart ?

 
 
F C
Guest
Posts: n/a
 
      12-16-2004
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.



 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      12-18-2004
Gazing into my crystal ball I observed "F C" <(E-Mail Removed)>
writing in news:(E-Mail Removed):

> 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
 
Reply With Quote
 
 
 
 
F C
Guest
Posts: n/a
 
      12-21-2004

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

<(E-Mail Removed)>
> writing in news:(E-Mail Removed):
>
> > 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.


 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      12-21-2004
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" <(E-Mail Removed)> wrote in message
news:OMp%(E-Mail Removed)...
>
> "Adrienne Boswell" <(E-Mail Removed)> a écrit dans le message
> news:
> Xns95C3C1D2886Farbpen2003sbcglobaln@64.164.98.7...
>> Gazing into my crystal ball I observed "F C"

> <(E-Mail Removed)>
>> writing in news:(E-Mail Removed):
>>
>> > 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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Application_OnStart =?Utf-8?B?QmlsbCBIZWNrbGU=?= ASP .Net 1 08-16-2004 11:49 AM
Application_OnStart event Marek ASP .Net 8 05-11-2004 05:05 AM
Global - Application_OnStart question Shiv Kumar ASP .Net 19 01-14-2004 07:31 PM
Storing Connection in Application_OnStart yop ASP .Net 4 08-20-2003 07:37 AM



Advertisments