Exception for GetUserStoreForApplication

When I callIsolatedStorageFile.GetUserStoreForApplication I get an IsolatedStoreException with "Unable to determine application identity of the caller." message.

The application is deployed using ClickOnce requiring full trust, and the assemblies are signed with a strong name using a self-generated key file .

[396 byte] By [viliescu] at [2007-12-16]
# 1
Usually you only get that error if you try to call a ClickOnce API (i.e. CurrentDeployment, CheckForUpdate, etc.) when the app has not been deployed by ClickOnce. This is the reason for the static IsNetworkDeployed property on the ApplicationDeployment class - to check whether it is safe to call the other APIs. Were you getting this when running in the debugger, or after the app has been clickonce deployed?

Brian
brian.noyes@idesign.net

BrianNoyes at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2
You are right, the exception is raised only when debugging / running locally. When deployed, it works OK. However, it would be better if it would work in debbuging mode. I was thinking to check "Debug this application as if it were downloaded from the following URL" but this option is disabled for full trust ClickOnce projects.
Thank you,
Valentin Iliescu
viliescu at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified