Click here to Skip to main content
13,003,589 members (63,426 online)
Rate this:
Please Sign up or sign in to vote.
Hello Friends I'm using Silverlight in my application.
I'm trying to create a folder in my local hard drive "D" using IsolatedStorageFile.

It is creating the directory when I give only Directory Name but I'm not getting where it exists.

And, when I give complete path "D:/Manish/ManishNewFolder" then it is raising an error Unable to create a directory.

string fileName = "D:/ManishNewFolder";
var store = IsolatedStorageFile.GetUserStoreForApplication();
if (!store.DirectoryExists(fileName))
var isoStream = store.OpenFile(fileName + @"/myvoice.wav", FileMode.OpenOrCreate);

Please guide me. I want to make a drive in my local drive "D".

Posted 8-Jan-12 18:48pm
Updated 8-Jan-12 19:24pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

These folders are created in a temporary storage location (like a cookie).

You cannot directly access the harddrive path in Silverlight (unless you run with elevated permissions).
That is the whole idea behind running Silverlight in a sandboxed environment.
Manish Namdev 9-Jan-12 1:12am
Abhinav many thanks for reply..
I checked in cookies,temp and in application data in my documents and settings but still not getting where is this folder exists.

And you mentioned sandboxed environment. I couldn't catch it can you please put some light on this.
Abhinav S 9-Jan-12 9:53am
This good link should give you an idea about where isolated storage is actually located. However, you should really not need to worry about its location and use it using the API.
Manish Namdev 10-Jan-12 2:21am
Thanks abhinav... I also read in some other articles that there is no need to worry about the location. But this morning when I run my application again then it shown me an error "Not Enough Space".
Now I have set the "Qutta" for the IsolatedStorageFile object and deleting the previous file if exists.
As the requirement in my application it can work. And I thinking giving a fixed amount of space can be a problem again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170626.1 | Last Updated 9 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100