When should I opt for IsolatedStorage versus AppData file storage?

感情迁移 提交于 2019-12-01 06:01:21

IsolatedStorage has a couple interesting features that might make you opt for it:

  • Even very low trusted applications (such as click-once) can access isolated storage. Not all applications can have access to AppData. Depending on the security policy imposed on the application, IsolatedStorage can also be limited, but it usually is more accessible than AppData/file system.

  • IsolatedStorage storage requirements can be controlled by administrator policy.

  • You don't have to know where or how isolated storage data is stored. It has a uniform API for accessing it on all systems you can completely ignore the underlying path that it is stored in. As you noted, this is very useful for a library which may have no idea how the hosting application stores data.

  • You can also have data stored data in isolated storage with vary levels of isolation very easily. See the IsolatedStorageScope values for more information. This is its namesake, so I guess I should have listed this point first :)

On the downside:

  • IsolatedStorage has some notable limits in the amount of data you can store there. For example, application preferences will be fine, but it is not appropriate for documents.

Some useful links:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!