Working with Isolated Storage in .NETWhile it is challenging to develop software to meet the user requirements, it is also equally vital to protect the data handled in the software application with the right level of security requirements. This is even more important for internet- based applications.
Most of the time, the data saved during the application instance is about its state and sometimes other key essential data like the user credentials, code, application-specific complex data, etc. This can be highly vulnerable to corruption and lead to unauthorized access to harmful programs like viruses. To prevent such events and provide a lucid way of granting access to store information with limited security and high reliability, .Net framework has introduced the concept of Isolated Storage. Isolated Storage is mainly designed to improve the security of application data in a secure way such that the storing and retrieval method by the application is not on adhoc basis. It provides a standard system for storage and retrieval of data without any conflict among the applications executing in the computer system. It enables the application to run under partial, limited or full trust. With this, there is no need for granting access rights to the User or the application for storing data in a specific file or folder in the hard disk. It also provides an easy alternate solution to avoid storing such data in a database which can bring an overhead in maintenance and cost. Overview of Isolated Storage Isolated Storage allocates compartments for storing information related to the application like application state, temporary data, etc. with/without user-specific data. These compartments represent the Isolated Storage and contain the actual location of directories/files in which this data is maintained. These files can reside on a client or server based on the requirement. The framework provides options to the Administrator of the system to control the file size of the Isolated Storage files based on the access level of the User who has been granted rights. While developing an application using Isolated Storage through code, the executing code has to possess the required access for operating with the Isolated Storage files. By default, the managed code executed by a .Net application has all access rights to work with the Isolated Storage files. This can be denied in case access rights are impersonation based. If it is so, care should be taken to ensure that the impersonated user executing the application using Isolated Storage files has proper operating system rights. Isolated Storage facilitates storing information along with users roaming profile in the server which will make information available always for a roaming user. Working with Isolated Storage .Net framework has implemented this concept of Isolated Storage in the form of rich classes which are included in the System.IO.IsolatedStorage namespace. Following are the different steps involved in executing the Isolated Storage concept in an application. Creating a File store Before creating a file store, it is necessary to plan for the scope of the data in the store. The scope of information can be restricted to either assembly calling the method and to the specific machine executing the application OR to calling assembly and the current user. In the former method, application-specific data can be stored while the user-specific data can be stored in the latter method. The IsolatedStorageFile class is used to access safe areas to store data for assemblies and users. Writing
and reading data
FREE
Subscription
Subscribe
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________ |