I need to store and retrieve data in Isolated storage mode in a winforms application. I have followed this msdn article and this is the code
IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.Machine | IsolatedStorageScope.Application,null,null);
When I exceute the above code I am getting Unable to determine application identity of the caller error.
Could anyone help me too solve this issue ?
Regards
Ramalingam S
In a WinForms application, GetMachineStoreForApplication()
or IsolatedStorageScope.Application
do not work. The application speciifc storages are designed for ClickOnce applications only.
Instead, use GetMachineStoreForAssembly()
or IsolatedStorageScope.User
if you want to store settings on a per-user basis.
Many examples from MSDN for Isolated storage appear incomplete.
You want to call these instead of GetStore
:
Please use this:
IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly, null, null)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With