asp.net mvc 3 - Application_End being called too early/frequently -
asp.net mvc 3 - Application_End being called too early/frequently -
i using temporary database in project disposed on application_end
:
protected void application_end() { if (_db != null) _db.dispose(); }
the problem application_end seems called whilst browsing through web project - seems when edit object in db, alter made, database disposed, , time redirected index - new db has been created , shows unchanged object if nil had happened.
shouldn't application_end beingness called when session ended or after amount of idle time?
could tell me how may able ensure application_end called when finished using application?
the problem application_end seems called whilst browsing through web project
that happens when appdomain unloaded. while debugging happen everytime recompile project normal because everytime recompile assembly in bin
folder beingness regenerated , asp.net recycles application domain.
when deploy application in iis happen more rarely, when iis decides recycle application. might happen under different circumstances: period of inactivity, cpu/memory thresholds reached, ...
shouldn't application_end beingness called when session ended or after amount of idle time?
no, application_end
has nil user sessions. called @ end of life of application domain.
could tell me how may able ensure application_end called when finished using application?
that's case: application_end
called asp.net runtime when application domain ready unloaded.
so if want avoid happening should utilize persistent database , not in-memory storage. if utilize in-memory storage tied lifetime of application have noticed extremely short.
asp.net-mvc-3 application-pool recycling
Comments
Post a Comment