Re: Exception using Isolated Storage in ASP.NET on a hosted server
- From: "Klaus H. Probst" <usenet001@xxxxxxxxxxxxx>
- Date: Sun, 3 Jul 2005 20:50:59 -0700
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?
>
.
- Follow-Ups:
- Re: Exception using Isolated Storage in ASP.NET on a hosted server
- From: Rick Spiewak
- Re: Exception using Isolated Storage in ASP.NET on a hosted server
- References:
- Prev by Date: Re: General Queries on dotnet
- Next by Date: Re: DOM Issue
- Previous by thread: Exception using Isolated Storage in ASP.NET on a hosted server
- Next by thread: Re: Exception using Isolated Storage in ASP.NET on a hosted server
- Index(es):
Relevant Pages
|