Re: Exception using Isolated Storage in ASP.NET on a hosted server

Tech-Archive recommends: Fix windows errors by optimizing your registry




I'm not sure what exactly is causing your error, but I wouldn't recommend
using isolated storage from ASP.NET, much less on a hosted server.

Isolated storage works on a per-identity and per-assembly basis. So you're
using the store allocated to the identity under which your web application
is running, usually the ASPNET account (on W2K) or NETWORK SERVICE (XP and
2003).

Isolated storage is better suited for rich client applications. Try using a
database for this. I'll admit there are scenarios where you could
theoretically use the technology from a web app, but these are the exception
and not the rule.

The MSDN docs identify "persistent web application storage" as a solution to
normal I/O restrictions; however in your hosted scenario you're stepping on
everyone's toes =) Also, you need specific permissions and a quota enabled
by an administrator on the server to use this successfully, something that
few shared hosting providers are going to do nowadays.

--
Klaus H. Probst, MVP
http://www.simulplex.net/


"Rick" <rickspiewak@xxxxxxxxxxxxxx> wrote in message
news:1120227362.681927.83330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I had assumed that Isolated Storage was the thing to use in a hosted
> environment. My code to do so works fine on servers where I have full
> access. I'm getting the following exception on the hosted environment:
>
> System.IO.DirectoryNotFoundException: Could not find a part of the path
> "*". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at
> System.IO.IsolatedStorage.IsolatedStorageFile.GetFileDirectoryNames(String
> path, String msg, Boolean file) at
> System.IO.IsolatedStorage.IsolatedStorageFile.GetRandomDirectory(String
> rootDir, Boolean& bMigrateNeeded, String& sOldStoreLocation) at
>
System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoaming(Isolated
StorageScope
> scope) at
>
System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScop
e
> scope) at
>
System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedSt
orageScope
> scope) at
> System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope
> scope) at
>
System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope
> scope, Type domainEvidenceType, Type assemblyEvidenceType) at
> System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForDomain()
> at AcronymService.Acronym.LoadAcronymsDocument() in
> C:\Projects\AcronymService\Acronym.asmx.vb:line 565 at
> AcronymService.Acronym.GetAcronymsDocument() in
> C:\Projects\AcronymService\Acronym.asmx.vb:line 529 at
> AcronymService.Acronym.GetAcronymsVersion() in
> C:\Projects\AcronymService\Acronym.asmx.vb:line 190
>
>
>
> This happens regardless of whether I use Assembly or Domain as the
> basis:
>
> Dim IsolatedFile As IsolatedStorageFile
>
> IsolatedFile = IsolatedStorageFile.GetUserStoreForAssembly
> or -
> IsolatedFile = IsolatedStorageFile.GetUserStoreForDomain
>
> Any ideas?
>


.



Relevant Pages

  • 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)
  • Re: Isolating files
    ... I don't agree that isolated storage must be bound to a user identity. ... scope, or both. ... > by a Windows Service running in the correct user context. ... > service to talk back to the WinForm app. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Isolated Storage Woes
    ... You don't have to do that - i can't remember all the details, but depending on the scope you may need a strong name. ... isolated storage. ... to do that in my development pipeline considering it has to be done ...
    (microsoft.public.dotnet.security)
  • Isolated Storage, XML File Upload
    ... My client needs to collect data on a disconnected computer. ... hoping I could store data in Isolated Storage as XML files and expose ... later to a server? ...
    (microsoft.public.dotnet.languages.csharp)