Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / August 2005

Tip: Looking for answers? Try searching our database.

Application State problem with ASP.NET 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Olivier Matrot - 11 Aug 2005 15:26 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.