Article: What is Isolated Storage ? (.Net FrameWork Tools Series)

Discussion in 'ASP .Net Security' started by Namratha Shah \(Nasha\), Nov 17, 2004.

  1. Hey Group,

    After a long week end I am back again. Its nice and refreshing after a short
    vacation so lets get started with .NET once again.

    Today we will discuss about Isolated Storage. This is one of the topics
    which I find interesting as I feel that it has a lot of practical usage or
    applicability.

    We all know that all applications need some storage space to archive certain
    application information like users preferences, appliction info, or certain
    data which can be cached on the user's local machine etc. Initially all this
    information was stored in .ini files which were simple to use and manage.
    Being a flat file their access was easy and Microsoft also provided us with
    API's to access these files. But the only problem with .ini files was where
    do u put these ini files and if the files were lost it would result in an
    application nightmare.

    To solve this problem microsoft came up with an another idea for storing
    application related information i.e. The Windows Registry. Although registry
    was good for storing application related information it was very slow coz of
    its hierarcial nature. Loading information of all the applications in the
    machine's registry made the search slow. Secondly application downloaded
    from the web can not be granted access to the local machines registry. Hence
    it could not be used for web apps.

    To solve all the above problems Micorsoft with .NET has now come up with the
    idea of Isolated Storage.

    Isolated storage enables paritally trusted applications to store data as per
    computer's security policy esp. the web app's and other downloaded
    components. Code running on the local computer ,local network or the
    Internet is granted the right to use this isolated storage.


    Isolated storage isolates data by user or by assembly. Credentials such as
    the origin, strong name of the assembly or application domain can be used to
    isolate data.

    But what is isolated storage ?

    Well Isolated storage is a special folder on your harddisk which allows your
    application to store its application specific data. Isolated stores are put
    up at Microsoft\IsolatedStorage directory.Change folder settings to show
    hidden files and folders in order to see isolated storage.

    On Windows 2000 you will be able to view "IsolatedStorage" folder at :-

    Roaming-enabled stores = <drive>\Documents and Settings\<user>\Application
    Data

    Non-roaming stores = <drive>\Documents and Settings\<user>\Local
    Settings\Application Data

    All applications have a special allocated place to store their data which is
    a data folder containing one or more isolated storage files, called stores
    in this folder. These stores contain the actual directory locations where
    data is stored. The data saved in the store can be any kind of data from
    user's preference information to application state.

    To access isolated storage the code must be have appropriate
    IsolatedStorageFilePermissions and all necessary native platform

    operating system rights.

    e.g. On an OS like Win 2000 the access control lists (ACLs) controls which
    users have the rights to use the file system. Hence web applications dont
    have access to the local hard disk. But these applications have access to
    the Isolated storage folder on the client machine to store any application
    data. Thus inspite of not having access to the local harddisk web app can
    store data related to their application in the IsolatedStorage folder.

    Microsoft .NET Framework applications already have operating system rights
    to access isolated storage unless they perform

    impersonation.


    Let us use the storeadm.exe tool to list ,add and delete isolated stores.

    1) You can go to the VS.NET command prompt and type storeadm.exe /? to view
    all the options.

    Usage : StoreAdm [options]

    options : [/LIST] [/REMOVE] [/ROAMING] [/QUIET]

    /LIST : Displays the existing isolated storage for the current user.

    /REMOVE : Removes all existing isolated storage for the current user.

    /ROAMING : Select the roaming store.

    /QUIET : Only error messages will be output.

    2) Use the storeadm /LIST option to list all the stores on your machine.
    This will list all the stores in your local machine.

    You can use isolated storage just like any other file system folder. There
    are special IsolatedStorageFileStreams to create files and directories.
    Tomorrow we will see how we can create these isolated stores.



    -- Please post your queries and comments for my articles in the usergroup
    for the benefit of all. I hope this step from my end is helpful to all of
    us.

    Regards,

    Namratha (Nasha)
     
    Namratha Shah \(Nasha\), Nov 17, 2004
    #1
    1. Advertising

  2. Why are you posting this in ASP.NET support groups? It would be better in
    your blog.

    "Namratha Shah (Nasha)" <> wrote in message
    news:%...
    >
    > Hey Group,
    >
    > After a long week end I am back again. Its nice and refreshing after a
    > short
    > vacation so lets get started with .NET once again.
    >
     
    Ken Cox [Microsoft MVP], Nov 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    9,172
    Namratha Shah \(Nasha\)
    Nov 17, 2004
  2. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    636
    Namratha Shah \(Nasha\)
    Nov 23, 2004
  3. Namratha Shah \(Nasha\)

    Article: What is Isolated Storage ? (.Net FrameWork Tools Series)

    Namratha Shah \(Nasha\), Nov 17, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    227
    Ken Cox [Microsoft MVP]
    Nov 19, 2004
  4. Namratha Shah \(Nasha\)

    Article : Security Tools Part -- 2 (.Net FrameWork Tools Series)

    Namratha Shah \(Nasha\), Nov 23, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    231
    Namratha Shah \(Nasha\)
    Nov 23, 2004
  5. Namratha Shah \(Nasha\)

    Article: What is Isolated Storage ? (.Net FrameWork Tools Series)

    Namratha Shah \(Nasha\), Nov 17, 2004, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    238
    Ken Cox [Microsoft MVP]
    Nov 19, 2004
Loading...

Share This Page