Hello,
I'm in the process of migrating an ASP.NET 1.1 site to 2.0.
One of the problem I encounter is the change of behavior of the framework
calling "Application_Start" in global.asax.cs.
Basically :
1) Issue an IISRESET to make sure to start from scratch.
2) First user accessing a page in the site : "Application_Start" is called.
During this call, I check database access and other few things and store
objects in the application object.
3) Wait until the ASP.NET process is recycled due to inactivity.
4) First user accessing the site after process shutdown. "Application_Start
is not called", so Application cache is missing the data that is requested
from the user's session, exceptions are raised to the user.
So, my question is : Is this a normal behavior in ASP.NET 2.0 ? Should I
rearchitecture my site ?
TIA.
Brock Allen - 11 Aug 2005 15:54 GMT
Application_Start should have the same semantics... so not sure what's going
on. In general if I were architeching such a site I wouldn't rely upon App_Start
anyway... I'd simply do a lazy load of the data you need. So internally keep
a check to see if it's been loaded and load it upon the first request. You
will have to think about multithreading though, so a simple lock on the first
load will be necessary.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hello,
> I'm in the process of migrating an ASP.NET 1.1 site to 2.0.
[quoted text clipped - 18 lines]
>
> TIA.