- C:\Windows\ServiceProfiles\LocalService\AppData\Local\IsolatedStorage
- C:\Windows\SysWOW64\config\systemprofile\AppData\Local\IsolatedStorage
- C:\Users\www.example.com\AppData\Local\IsolatedStorage
Each time that I tried to write to isolated storage, the code threw an exception System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468). What this told me was that the Web Server process user couldn't create the directory. For once, however, my Google-fu wasn't strong enough to actually solve the problem. I found on the web solutions like: go to the directory (which one?) where it was going to write and give the user (which one?) write permission on the directory, or give the process (which one?) enormous privilege for a little while so the directory could be created. I tried various permutations of these, without success.
Then I notice there is a property in the IIS configuration dialogs that is exactly what I need: Load User Profile, which by default is set to false. This property is found in IIS Manager. You select the application pool that controls your web site, and go to Advanced Settings. After turning this to true, IIS creates a directory for the web site under C:\Users. So if your web site is named www.example.com, it creates a directory C:\Users\www.example.com. When you write the Isolated storage, it is written under there under C:\Users\www.example.com\AppData\Local\IsolatedStorage.
Thank you Thank you Thank you Thank you Thank you!
ReplyDeleteWell, thanks again from other reader!
ReplyDelete