.net - Isolated storage access permissions -


I have an application that stores data in different storage data stored in the machine-assembly area So that all users of a given machine can access this data.

Everything seemed to work just fine under the admin account, but as soon as we tested our app under the guest account, we have participated in user permission restrictions. It seems that being a simple folder created by separate storage, OS, these folders may have some restrictions on user access.

By default set to allow read in my case a guest account / write, but as soon as we were placed in a file that administrators storage per account, we have been an exception since the guest account The attempt to remove was not the right to remove files created by another user.

As a result, each time we get an accident, when the guest is created by another user A require removal of files, then tries to use some features.

I thought maybe I warned proceed him with deletion check permissions guest that he was trying to not use these features because they do not have sufficient rights , But since the path is prepared by the OS for separate storage and there is no way to find it (except for the complete transcellation of the file system), so that There is no way to see what right is in the rights account

Perhaps someone has a suggestion about this?

made since the path to a separate storage by OS and find it there is no way

there is, but you'll need to use the reflection is the same idea on a user store (in this case do I):

  string path; Using (IsolatedStorageFile ISF = IsolatedStorageFile.GetUserStoreForAssembly ()) using {(IsolatedStorageFileStream stream = new IsolatedStorageFileStream (fileNamePlusExtension, FileMode.Create, ISF)) {stream.Write (contents, 0, content.Length); FieldInfo pi = stream.GetType () GetField ("m_FullPath", BindingFlags.Instance | BindingFlags.NonPublic); Path = pi.GetValue (stream). Ostring (); }}   

I dont't know why there might not be a way to get to such a file in the future.

You may create files and then set permissions for the guest account.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -