Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hello Friends I'm using Silverlight in my asp.net 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))
{
   store.CreateDirectory(fileName);
}
var isoStream = store.OpenFile(fileName + @"/myvoice.wav", FileMode.OpenOrCreate);
isoStream.Close();
store.Dispose();
Please guide me. I want to make a drive in my local drive "D".
 

 
Thanks
Posted 8-Jan-12 18:48pm
Edited 8-Jan-12 19:24pm
Mehdi Gholam238.7K
v3

1 solution

Rate this: bad
good
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.
  Permalink  
Comments
Manish Namdev at 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 at 9-Jan-12 9:53am
   
This good link http://msdn.microsoft.com/en-us/magazine/dd458794.aspx 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 at 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
0 Sergey Alexandrovich Kryukov 385
1 George Jonsson 339
2 CPallini 335
3 BillWoodruff 314
4 OriginalGriff 227
0 OriginalGriff 5,030
1 CPallini 4,225
2 Sergey Alexandrovich Kryukov 3,604
3 George Jonsson 2,831
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 9 Jan 2012
Copyright © CodeProject, 1999-2014
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