I have a singleton WCF service hosted in IIS. I want to implement a store for persisting state for the service. I am writing my data to XML file.
Can you please tell me what is the recommended way of doing this? What events I can listen to while my WCF service unloads and reloads.
Based on your comment the only valid approach is persisting service state each time the configuration changes – it means in each request changing the setting. Otherwise after each unexpected termination of the AppDomain you will lose last configuration.