Session_OnStart is not a viable alternative because we
have session state disabled on all virtual directories.
We've found that enabling session state decreases the
scalability of our application by 25-40%, so we always
disable session state.
As for the overall design of the application, it is a
massive ASP based application with about 2500 pages for
managing customer interactions. The reason that we must
have multiple virtual directories pointing to the same
code base is that I work for a hosting company, so we have
multiple customers on the same application. The trick is
that the application is based upon a packaged, enterprise
software application so we must upgrade our modified
version of the product periodically and to minimize the
overall maintenance and upgrade effort we keep all of our
customers on a single code base. We initially started out
with each virtual directory pointing to a separate copy of
the code, but found that propagating changes to the
servers would take 10+ hours. Plus, the overall effort to
manage that many 'sets' of code was going to force us to
hire at least one additional programmer.
-----Original Message-----
put your init code into session_onstart
use an app var as a flag to skip the init code if a
particular virtual dirhas already been initialized.
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Mark Hoagland" <an*******@discussions.microsoft.com>
wrote in messagenews:05****************************@phx.gbl... I've got a scenario with a web application where I must
access the virtual directory being accessed from within
the Application_OnStart event handler. Specifically, I
have a series of IIS virtual directories which all point
to the same set of ASP pages. However, since each
virtual directory is a separate 'application', each has its own
set data which must be cached. To detect which data must
be cached for each virtual directory, I need to detect
the name of the virtual directoy being invoked from within
the Application_OnStart event.
The problem is that the Request.ServerVariables
collection is not avaiable within the Application_OnStart event
handler. Is there a workaround for this?
Thanks,
Mark
.