IsolatedStorage with impersonation in ASP.NET problem

From: Zdenek Drlik (drlik_at_asd-software.cz)
Date: 01/25/05


Date: Tue, 25 Jan 2005 14:43:18 +0100

Hi,
I have an ASP.NET application. I want to use IsolatedStorage in this
application. When I run this application with anonymous access set in
IIS (user set to IUSR_<machine>) and impersonation set to false in
web.config, IsolatedStorage works fine.
But when I try to set impersonation to true via the web.config, calling

IsolatedStorageFile.GetUserStoreForDomain()

get me an IsolatedStorageException with this call stack:

System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope
scope) +0
System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoaming(IsolatedStorageScope
scope) +42
System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope
scope) +98
System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope
scope) +208
System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope
scope) +37
System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope
scope, Type domainEvidenceType, Type assemblyEvidenceType) +66
 
System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForDomain() +12

and tells me that storage directory cannot be created (System could not
find specified file).

Does anybody know what's wrong, or how to use IsolatedStorage with
impersonation in ASP.NET?
Thanks

Zdenek Drlik



Relevant Pages

  • Re: .Net applet security question
    ... IsolatedStorage! ... System.IO.IsolatedStorage.IsolatedStorage.DemandPermission(IsolatedStorageScope scope) ... scope, Evidence domainEv, Type domainEvidenceType, Evidence assemEv, Type ... scope, Type domainEvidenceType, Type assemblyEvidenceType) ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • IsolatedStorage with impersonation in ASP.NET problem
    ... web.config, IsolatedStorage works fine. ... But when I try to set impersonation to true via the web.config, ... scope) +0 ... scope, Type domainEvidenceType, Type assemblyEvidenceType) +66 ...
    (microsoft.public.dotnet.security)
  • IsolatedStorage with impersonation in ASP.NET problem
    ... web.config, IsolatedStorage works fine. ... But when I try to set impersonation to true via the web.config, ... scope) +0 ... scope, Type domainEvidenceType, Type assemblyEvidenceType) +66 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Exception using Isolated Storage in ASP.NET on a hosted server
    ... 2003 without SP1, using IsolatedStorage, that is accessed by a web ... I really need to make my existing code be able to run on SP1. ... > using isolated storage from ASP.NET, much less on a hosted server. ... >> scope) at ...
    (microsoft.public.dotnet.framework)