开发者

Remove Isolated files for an application

开发者 https://www.devze.com 2023-02-16 03:58 出处:网络
We have a windows application, where we make use IsolatedStorage to save some application settings. And recently user asked us to provide option to reset the application means, it should as newly inst

We have a windows application, where we make use IsolatedStorage to save some application settings. And recently user asked us to provide option to reset the application means, it should as newly installed application.

So, we have built a small utilit开发者_StackOverflowy app to delete all application data, as Isolated storage created by framework, is there any way we can delete on our application Isolated storage.


We found Isolated Storage very inconvenient because only the assembly that creates the isolated storage files can access them. To delete them you will need to add deletion routines to the assembly that originally created the IS, and then include that assembly into your uninstaller so that you can call it to access the IS.

You can manually clear the IS files with the IS manager application, but unless an improved version is now available, it gives very poor control and just deletes everything.

We abandoned IS when we realised this because the hassle factor for installation/uninstallation makes IS utterly impractical, and we found troubleshooting difficult, as finding the IS files manually is messy and slow - In the end we just moved our data files into AppData, where it is easily accessible. The alleged benefit of IS is that only the assembly that creates the files can access them, but in reality anyone who can find the IS location on disk can do anything they like with the files.

0

精彩评论

暂无评论...
验证码 换一张
取 消