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

Signature
http://www.openmymind.net/
> Upon startup of my ASP.NET 2.0 application, I check if the application
> configuration is in an acceptable state inside an override of
[quoted text clipped - 14 lines]
> Thanks for any help
> Urs
Urs Eichmann - 13 Feb 2006 15:42 GMT
Hi Karl,
thanks for your suggestion. I was hoping that there is a more "elegant"
solution which I overlooked.
> ne 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.
The problem is, if the configuration isn't right the site might work
for the first page, then suddenly bombing out on the next page. I want
to make sure that not even the first page is being displayed in case of
configuration errors.
Urs