Hi there,
Yes, your assumptions are correct. Depending on your OS, IIS is restarted every now and then (for example, Windows Server 2003 has a setting that allows you to restart the application every xx minutes or hours, preventing possible memory leaks for example).
It's indeed a good idea to store this information in a text file, or in a database. If I were you, I wouldn't rely on on Application_OnEnd, but instead write the data to the file as soon as it is changed.
Check out the following article that describes this entire process. It uses a Hit Counter as an example, but basically you can save anything you want:
http://Imar.Spaanjaars.Som/QuickDocID.aspx?QUICKDOC=164
There is also a database version of the article, where the contents are stored in a database:
http://Imar.Spaanjaars.Som/QuickDocID.aspx?QUICKDOC=165
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.