Asp – Preserving ASP.NET Application State Across Restarts

application-stateasp.netnetweb-applications

Any good way to preserve ASP.NET Application state across restarts?

I want to be able to set some values restart the app and have them still be there.
I want to primarily do this for small "throw-away" test web apps that don't even need a database.

Is there some way to do it with static members and serialization? web cache?

UPDATE:
Application should be able to update these values.
Values could be custom objects like:

public class Person    
{  
  public string FirstName { get; set; }  
  public string LastName { get; set; }      
}  

Best Answer

You need some sort of persistent data storage, whether that's a database, xml files or something else.

You might be interested in the SimpleRepository with SqlLite from SubSonic which gets pretty close to what you describe.