Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Application state variable issue


Message #1 by "Sachin Mhatre" <sachinx@h...> on Thu, 06 Feb 2003 14:58:37 +0530
Hi there,

It depends what files you change. If you overwrite the global.asa, you
_will_ loose the values in application and session state as the
application gets restarted. For other files, the application should remain
active.

You could write your application variables to disk in the
Application_OnEnd event using the FileSystemObject. In Application_OnStart
you can read them in again.

This way, you have a way to preserve the values with a _normal_ server
shutdown. If the server or application crahses, you still loose the
variables.

HtH


> Hi,
> My Web application is working live. I have a site hit counter variable in
> Application state. If I again deploy (copy files) the application then
> will my Application state varible's value will be lost?
> I have initialized the value to 0 in Globle.asax file.
>  
> Waiting for the reply


  Return to Index