MatthewMartin
MatthewMartin

Reputation: 33173

Can all apps access all files in Isolated storage on shared asp.net server?

I'm considering using IsolatedStorage for my temporary files. However, the documenation seems to imply that the storage space is determiend by the windows user account, which for an ASP.NET application is NETWORK SERVICES. If there are multiple websites/applications using NETWORK SERVICES as their account, won't that mean they all will share the same IsolatedStorage and be able to read each others files?

Upvotes: 0

Views: 476

Answers (1)

jerryjvl
jerryjvl

Reputation: 20151

I think you have more flexibility if you construct your IsolatedStorageFileStream using an IsolatedStorageFile instance, because they can be created on for example an app-specific basis:

using (IsolatedStorageFile isf = IsolatedStorageFile.GetMachineStoreForApplication())
using (IsolatedStorageFileStream isfs = new IsolatedStorageFileStream("filename", FileMode.Create, isf))
{
    // Code using the file stream here...
}

Upvotes: 1

Related Questions