I have a clickonce app and it works fine in production, with method:
IsolatedStorageFile.GetUserStoreForApplication()
which executes successfully. When I try to debug my application it crashes with IsolatedStorageException because of "The application identity of the caller cannot be determined.." as described here
All assemblies associated with an application use the same isolated store when using this method. This method can be used only when the application identity can be determined - for example, when the application is published through ClickOnce deployment or is a Silverlight-based application. If you attempt to use this method outside a ClickOnce or Silverlight-based application, you will receive an IsolatedStorageException exception, because the application identity of the caller cannot be determined.
My question is how to use IsolatedStorageFile.GetUserStoreForApplication() and debug application without exceptions?
- Probably do some checks?
- or use custom application identity?
- or use IsolatedStorageFile.GetEnumerator to get avalible stores?