Home All Groups Group Topic Archive Search About

Isolated Storage Access

Author
31 May 2005 2:01 PM
Dirk Ströker
Hello,

I have got the following problem:
My application references an assembly of a third party library. A class
implemented in this assembly stores a file in the Isolated Storage.
Unfortunately this class does not implement a method to delete this file.
But this is very important for me.

I tried to use the method "System.IO.IsolatedStorageFile.GetStore()" to get
access to the Isolated Storage of this assembly and call
"System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But calling
"GetStore()" gets me in trouble with the security mechanism of the .NET
framework. I get the following exception message:

"Selected identity type missing in assembly evidence list."

Because I never get in contact with evidence / identity and co. before, I
have a big problem now.
What must I do to get the Isolated Storage of another assembly than the
calling one?

(The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)

Regards
Dirk Ströker

Author
31 May 2005 3:47 PM
Nicole Calinoiu
"Dirk Ströker" <dstroe***@kw-software.de> wrote in message
news:eOR5ukeZFHA.3960@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> I have got the following problem:
> My application references an assembly of a third party library. A class
> implemented in this assembly stores a file in the Isolated Storage.
> Unfortunately this class does not implement a method to delete this file.
> But this is very important for me.

Have you tried asking the library provider to add the functionality?  It
sounds like it would probably be a very reasonable request.


> I tried to use the method "System.IO.IsolatedStorageFile.GetStore()" to
> get
> access to the Isolated Storage of this assembly and call
> "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
> calling
> "GetStore()" gets me in trouble with the security mechanism of the .NET
> framework. I get the following exception message:
>
> "Selected identity type missing in assembly evidence list."

Which overload of GetStore are you calling and with what arguments?


> Because I never get in contact with evidence / identity and co. before, I
> have a big problem now.
> What must I do to get the Isolated Storage of another assembly than the
> calling one?
>
> (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
> IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)

For starters, you should ensure that you're using the same scope as the code
under which the store was created.  Have you used a decompiler such as
Reflector (http://www.aisto.com/roeder/dotnet/) to verify this?


Show quoteHide quote
>
> Regards
> Dirk Ströker
>
>
Are all your drivers up to date? click for free checkup

Author
2 Jun 2005 10:55 AM
Dirk Ströker
Show quote Hide quote
"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> schrieb im
Newsbeitrag news:eIhVxmfZFHA.3648@TK2MSFTNGP14.phx.gbl...
> "Dirk Ströker" <dstroe***@kw-software.de> wrote in message
> news:eOR5ukeZFHA.3960@TK2MSFTNGP10.phx.gbl...
> > Hello,
> >
> > I have got the following problem:
> > My application references an assembly of a third party library. A class
> > implemented in this assembly stores a file in the Isolated Storage.
> > Unfortunately this class does not implement a method to delete this
file.
> > But this is very important for me.
>
> Have you tried asking the library provider to add the functionality?  It
> sounds like it would probably be a very reasonable request.
>

Maybe they add this feature but I cannot wait for a new version which will
be released in a few month because I have to solve the problem now!

>
> > I tried to use the method "System.IO.IsolatedStorageFile.GetStore()" to
> > get
> > access to the Isolated Storage of this assembly and call
> > "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
> > calling
> > "GetStore()" gets me in trouble with the security mechanism of the .NET
> > framework. I get the following exception message:
> >
> > "Selected identity type missing in assembly evidence list."
>
> Which overload of GetStore are you calling and with what arguments?
>

My code looks like this:

Assembly assembly = typeof(MyAssembly.Class1).Assembly;
Evidence assemblyEvidence = assembly.Evidence;
IsolatedStorageFile isf =
IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly |
IsolatedStorageScope.User, AppDomain.CurrentDomain.Evidence.GetType(),
assemblyEvidence.GetType());

But I am not sure what I doing here! I have no experience with it!

Show quoteHide quote
>
> > Because I never get in contact with evidence / identity and co. before,
I
> > have a big problem now.
> > What must I do to get the Isolated Storage of another assembly than the
> > calling one?
> >
> > (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
> > IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)
>
> For starters, you should ensure that you're using the same scope as the
code
> under which the store was created.  Have you used a decompiler such as
> Reflector (http://www.aisto.com/roeder/dotnet/) to verify this?
>

Yes I checked the scope. It is identical.

>
> >
> > Regards
> > Dirk Ströker
> >
> >
>
>

Dirk
Author
3 Jun 2005 5:21 PM
Nicole Calinoiu
Since assembly-level scoping is being used, you need to ensure that you're
presenting the same assembly evidence.  When the store is created, is the
evidence from your assembly or the library assembly being used?


Dirk Ströker" <dstroe***@kw-software.de> wrote in message
Show quoteHide quote
news:ugO3ZG2ZFHA.3144@TK2MSFTNGP12.phx.gbl...
>
> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> schrieb im
> Newsbeitrag news:eIhVxmfZFHA.3648@TK2MSFTNGP14.phx.gbl...
>> "Dirk Ströker" <dstroe***@kw-software.de> wrote in message
>> news:eOR5ukeZFHA.3960@TK2MSFTNGP10.phx.gbl...
>> > Hello,
>> >
>> > I have got the following problem:
>> > My application references an assembly of a third party library. A class
>> > implemented in this assembly stores a file in the Isolated Storage.
>> > Unfortunately this class does not implement a method to delete this
> file.
>> > But this is very important for me.
>>
>> Have you tried asking the library provider to add the functionality?  It
>> sounds like it would probably be a very reasonable request.
>>
>
> Maybe they add this feature but I cannot wait for a new version which will
> be released in a few month because I have to solve the problem now!
>
>>
>> > I tried to use the method "System.IO.IsolatedStorageFile.GetStore()" to
>> > get
>> > access to the Isolated Storage of this assembly and call
>> > "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
>> > calling
>> > "GetStore()" gets me in trouble with the security mechanism of the .NET
>> > framework. I get the following exception message:
>> >
>> > "Selected identity type missing in assembly evidence list."
>>
>> Which overload of GetStore are you calling and with what arguments?
>>
>
> My code looks like this:
>
> Assembly assembly = typeof(MyAssembly.Class1).Assembly;
> Evidence assemblyEvidence = assembly.Evidence;
> IsolatedStorageFile isf =
> IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly |
> IsolatedStorageScope.User, AppDomain.CurrentDomain.Evidence.GetType(),
> assemblyEvidence.GetType());
>
> But I am not sure what I doing here! I have no experience with it!
>
>>
>> > Because I never get in contact with evidence / identity and co. before,
> I
>> > have a big problem now.
>> > What must I do to get the Isolated Storage of another assembly than the
>> > calling one?
>> >
>> > (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
>> > IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)
>>
>> For starters, you should ensure that you're using the same scope as the
> code
>> under which the store was created.  Have you used a decompiler such as
>> Reflector (http://www.aisto.com/roeder/dotnet/) to verify this?
>>
>
> Yes I checked the scope. It is identical.
>
>>
>> >
>> > Regards
>> > Dirk Ströker
>> >
>> >
>>
>>
>
> Dirk
>
>
Author
6 Jun 2005 11:34 AM
Dirk Ströker
The library gets the store using the following line:

IsolatedStorageFile.GetStore(IsolatedStorageScope.Domain |
IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, null);


Show quoteHide quote
"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> schrieb im
Newsbeitrag news:efrupVGaFHA.1040@TK2MSFTNGP10.phx.gbl...
> Since assembly-level scoping is being used, you need to ensure that you're
> presenting the same assembly evidence.  When the store is created, is the
> evidence from your assembly or the library assembly being used?
>
>
> Dirk Ströker" <dstroe***@kw-software.de> wrote in message
> news:ugO3ZG2ZFHA.3144@TK2MSFTNGP12.phx.gbl...
> >
> > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> schrieb im
> > Newsbeitrag news:eIhVxmfZFHA.3648@TK2MSFTNGP14.phx.gbl...
> >> "Dirk Ströker" <dstroe***@kw-software.de> wrote in message
> >> news:eOR5ukeZFHA.3960@TK2MSFTNGP10.phx.gbl...
> >> > Hello,
> >> >
> >> > I have got the following problem:
> >> > My application references an assembly of a third party library. A
class
> >> > implemented in this assembly stores a file in the Isolated Storage.
> >> > Unfortunately this class does not implement a method to delete this
> > file.
> >> > But this is very important for me.
> >>
> >> Have you tried asking the library provider to add the functionality?
It
> >> sounds like it would probably be a very reasonable request.
> >>
> >
> > Maybe they add this feature but I cannot wait for a new version which
will
> > be released in a few month because I have to solve the problem now!
> >
> >>
> >> > I tried to use the method "System.IO.IsolatedStorageFile.GetStore()"
to
> >> > get
> >> > access to the Isolated Storage of this assembly and call
> >> > "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
> >> > calling
> >> > "GetStore()" gets me in trouble with the security mechanism of the
..NET
> >> > framework. I get the following exception message:
> >> >
> >> > "Selected identity type missing in assembly evidence list."
> >>
> >> Which overload of GetStore are you calling and with what arguments?
> >>
> >
> > My code looks like this:
> >
> > Assembly assembly = typeof(MyAssembly.Class1).Assembly;
> > Evidence assemblyEvidence = assembly.Evidence;
> > IsolatedStorageFile isf =
> > IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly |
> > IsolatedStorageScope.User, AppDomain.CurrentDomain.Evidence.GetType(),
> > assemblyEvidence.GetType());
> >
> > But I am not sure what I doing here! I have no experience with it!
> >
> >>
> >> > Because I never get in contact with evidence / identity and co.
before,
> > I
> >> > have a big problem now.
> >> > What must I do to get the Isolated Storage of another assembly than
the
> >> > calling one?
> >> >
> >> > (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
> >> > IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)
> >>
> >> For starters, you should ensure that you're using the same scope as the
> > code
> >> under which the store was created.  Have you used a decompiler such as
> >> Reflector (http://www.aisto.com/roeder/dotnet/) to verify this?
> >>
> >
> > Yes I checked the scope. It is identical.
> >
> >>
> >> >
> >> > Regards
> >> > Dirk Ströker
> >> >
> >> >
> >>
> >>
> >
> > Dirk
> >
> >
>
>
Author
6 Jun 2005 2:09 PM
Nicole Calinoiu
In that case, you should be able to retrieve the library store using the
following call:

IsolatedStorageFile.GetStore(IsolatedStorageScope.Domain |
      IsolatedStorageScope.Assembly | IsolatedStorageScope.User,
      typeof(SomeTypeInYourExecutable).Assembly.Evidence, null,
      typeof(SomeTypeInTheLibrary).Assembly.Evidence, null)





Show quoteHide quote
"Dirk Ströker" <dstroe***@kw-software.de> wrote in message
news:%23nITuuoaFHA.3040@TK2MSFTNGP14.phx.gbl...
> The library gets the store using the following line:
>
> IsolatedStorageFile.GetStore(IsolatedStorageScope.Domain |
> IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, null);
>
>
> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> schrieb im
> Newsbeitrag news:efrupVGaFHA.1040@TK2MSFTNGP10.phx.gbl...
>> Since assembly-level scoping is being used, you need to ensure that
>> you're
>> presenting the same assembly evidence.  When the store is created, is the
>> evidence from your assembly or the library assembly being used?
>>
>>
>> Dirk Ströker" <dstroe***@kw-software.de> wrote in message
>> news:ugO3ZG2ZFHA.3144@TK2MSFTNGP12.phx.gbl...
>> >
>> > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> schrieb im
>> > Newsbeitrag news:eIhVxmfZFHA.3648@TK2MSFTNGP14.phx.gbl...
>> >> "Dirk Ströker" <dstroe***@kw-software.de> wrote in message
>> >> news:eOR5ukeZFHA.3960@TK2MSFTNGP10.phx.gbl...
>> >> > Hello,
>> >> >
>> >> > I have got the following problem:
>> >> > My application references an assembly of a third party library. A
> class
>> >> > implemented in this assembly stores a file in the Isolated Storage.
>> >> > Unfortunately this class does not implement a method to delete this
>> > file.
>> >> > But this is very important for me.
>> >>
>> >> Have you tried asking the library provider to add the functionality?
> It
>> >> sounds like it would probably be a very reasonable request.
>> >>
>> >
>> > Maybe they add this feature but I cannot wait for a new version which
> will
>> > be released in a few month because I have to solve the problem now!
>> >
>> >>
>> >> > I tried to use the method "System.IO.IsolatedStorageFile.GetStore()"
> to
>> >> > get
>> >> > access to the Isolated Storage of this assembly and call
>> >> > "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
>> >> > calling
>> >> > "GetStore()" gets me in trouble with the security mechanism of the
> .NET
>> >> > framework. I get the following exception message:
>> >> >
>> >> > "Selected identity type missing in assembly evidence list."
>> >>
>> >> Which overload of GetStore are you calling and with what arguments?
>> >>
>> >
>> > My code looks like this:
>> >
>> > Assembly assembly = typeof(MyAssembly.Class1).Assembly;
>> > Evidence assemblyEvidence = assembly.Evidence;
>> > IsolatedStorageFile isf =
>> > IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly |
>> > IsolatedStorageScope.User, AppDomain.CurrentDomain.Evidence.GetType(),
>> > assemblyEvidence.GetType());
>> >
>> > But I am not sure what I doing here! I have no experience with it!
>> >
>> >>
>> >> > Because I never get in contact with evidence / identity and co.
> before,
>> > I
>> >> > have a big problem now.
>> >> > What must I do to get the Isolated Storage of another assembly than
> the
>> >> > calling one?
>> >> >
>> >> > (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain
>> >> > |
>> >> > IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)
>> >>
>> >> For starters, you should ensure that you're using the same scope as
>> >> the
>> > code
>> >> under which the store was created.  Have you used a decompiler such as
>> >> Reflector (http://www.aisto.com/roeder/dotnet/) to verify this?
>> >>
>> >
>> > Yes I checked the scope. It is identical.
>> >
>> >>
>> >> >
>> >> > Regards
>> >> > Dirk Ströker
>> >> >
>> >> >
>> >>
>> >>
>> >
>> > Dirk
>> >
>> >
>>
>>
>
>
Author
31 May 2005 4:21 PM
Dominick Baier [DevelopMentor]
Hello Dirk,

you can also manipulate the store using the storeadm.exe command line tool

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Hello,
>
> I have got the following problem:
> My application references an assembly of a third party library. A
> class
> implemented in this assembly stores a file in the Isolated Storage.
> Unfortunately this class does not implement a method to delete this
> file.
> But this is very important for me.
> I tried to use the method "System.IO.IsolatedStorageFile.GetStore()"
> to get access to the Isolated Storage of this assembly and call
> "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
> calling "GetStore()" gets me in trouble with the security mechanism of
> the .NET framework. I get the following exception message:
>
> "Selected identity type missing in assembly evidence list."
>
> Because I never get in contact with evidence / identity and co.
> before, I
> have a big problem now.
> What must I do to get the Isolated Storage of another assembly than
> the
> calling one?
> (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
> IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)
>
> Regards
> Dirk Ströker
Author
2 Jun 2005 10:39 AM
Dirk Ströker
Hello Dominick,

using the storeadm.exe tool removes ALL stores of a user and not a specific
one.

Dirk

Show quoteHide quote
"Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com>
schrieb im Newsbeitrag news:427888632531568248901536@news.microsoft.com...
> Hello Dirk,
>
> you can also manipulate the store using the storeadm.exe command line tool
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > Hello,
> >
> > I have got the following problem:
> > My application references an assembly of a third party library. A
> > class
> > implemented in this assembly stores a file in the Isolated Storage.
> > Unfortunately this class does not implement a method to delete this
> > file.
> > But this is very important for me.
> > I tried to use the method "System.IO.IsolatedStorageFile.GetStore()"
> > to get access to the Isolated Storage of this assembly and call
> > "System.IO.IsolatedStorageFile.DeleteFile()" to remove the file. But
> > calling "GetStore()" gets me in trouble with the security mechanism of
> > the .NET framework. I get the following exception message:
> >
> > "Selected identity type missing in assembly evidence list."
> >
> > Because I never get in contact with evidence / identity and co.
> > before, I
> > have a big problem now.
> > What must I do to get the Isolated Storage of another assembly than
> > the
> > calling one?
> > (The scope of my "GetStore()" call is: "IsolatedStorageScope.Domain |
> > IsolatedStorageScope.Assembly | IsolatedStorageScope.User" .)
> >
> > Regards
> > Dirk Ströker
>
>
>

Bookmark and Share