views:

131

answers:

1

We have an ASP.NET 2.0 website with an advanced configuration that is not catered for by a standard Web.config. Instead we're storing the config in our own Xml schema in the /bin/ folder, and we have a singleton object which caches this config and uses a FileSystemWatcher to detect updates. This logic sits in a separate class library which is just used by the website.

Problem is, every time we edit this config, all user sessions are reset, as if we'd restarted the app pool in IIS! We're using singletons and various other caching mechanisms which work just fine, but for some reason only the one with the FSW bombs out. Any ideas would be appreciated!

+4  A: 

If your XML file is under your BIN folder then web application will automatically be RESTARTED when anything changes in that folder.

The Web Application will also RESTART if Web.Config or Machine.Config are changed or edited.

Rasik Jain
Thanks, we moved it to the App_Data folder instead (seems an obvious place to put it in retrospect) and we can now update it perfectly without resetting sessions. Respect!
realworldcoder