Purge throws IsolatedStorageException

Dec 19, 2011 at 2:12 PM

When calling ISterlingDatabaseInstance.Purge() method I get the following exception

Wintellect.Sterling.IsolatedStorage.IsoStorageHelper._Purge(String path, Boolean clear)   
Wintellect.Sterling.IsolatedStorage.IsoStorageHelper._Purge(String path, Boolean clear) 
Wintellect.Sterling.IsolatedStorage.IsoStorageHelper.Purge(String path)   

To me this suggests that something is touching a file or directory of the file system underlying the Sterling database and preventing it from being deleted. Is there best practises for performing a purge? I've placed locks around all write (and read) operations without preventing this exception. I've also attempted to Deactivate the engine, Activate it again and then purge (all around a lock to prevent creation/read/write operations) without success. 

I'm using the IsolatedStorageDriver when creating the instance of the database. Purge code added below.



        protected internal static void PurgeDatabase() {
            if(_engine != null && _database != null) {
                lock(DATABASE_WRITE_LOCK) {
                    purgeRequestFlag = true;
                    purgeRequestFlag = false;