Application var emptying with no reason

hash1

New Member
It happened twice this week-end. My varibale stored in the application get empty with no reason at all.<BR><BR>The var get filled in global.asax so it should not be cause by a restart, i think.<BR><BR>Any idea on this ? Is there some kind of timeout on those variable like a session timeout ?Is there a way i can restart the application in my code.<BR>This way i could check to see if the application is filled with my variable and if it is empty I reload global.asax ?Is there a way i can restart the application in my code.<BR>This way i could check to see if the application is filled with my variable and if it is empty I reload global.asax ?You should have some code in your global.asax under the application_onstart event. That way if your app restarts it repopulates the application:<BR><BR> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)<BR> Application.UnLock()<BR> Application.Add("client_root", "c:
oot\")<BR> Application.Add("conn", "server=server;uid=uid;pwd=pass;database=db")<BR> Application.Lock()<BR> End Sub<BR><BR>And it's my understanding that asp.net has builtin triggers to restart itself if it gets in trouble.I already have this code, that's my problem.<BR>But for some reason the memory get cleaned or something and all my variable go blank. If i am right, the application don't stop so it never restart to fill the memory again.<BR><BR>I need to either find a way to programaticaly restart the aplication so i can do something like this<BR><BR>If var is empty then<BR>restart app <BR>Else<BR>Do your doing<BR><BR>Or find out why it flush all the data and prevent it from doing so.
 
Back
Top