this is all I can think of early in the morning:
Init{
TryLoadConfiguration();
}
function TryLoadConfiguration()
{
//do stuff
bool successfullyLoaded = true/false;
HttpApplication.Add("IsLoaded", successfullyLoaded );
if (!successfullyLoaded )
{
throw new exception
}
}
Application_BeginRequest (or session_start)
if (((bool)HttpApplication("IsLoaded")) == false)
{
TryLoadConfiguration();
}
in other words, keep track of whether or not you've successfully loaded in
the application variable.
One has to wonder, what is it in Init that might fail once but then suddenly
start working? Typically, if configuration stuff fails, the site should
crash until someone manually fixes it and restarts it.
Karl
--
http://www.openmymind.net/
"Urs Eichmann" <ur*@prismanet.ch> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Upon startup of my ASP.NET 2.0 application, I check if the application
configuration is in an acceptable state inside an override of
HttpApplication.Init(). If not, I raise an exception from this method.
Everything fine so far.
But I noticed that, the next time the application gets called, the Init
method is not being called anymore, even tough it ended with an
exception the last time (which means that Init was not completed).
Instead, Session_Start is being called as if the initialisation
succeeded.
Is there a way to actually tell the ASP.NET framework that the
initialisation of the application was not successful and that it should
repeat the initialisation the next time a session is opened?
Thanks for any help
Urs