Question

Is there any way of identifying (at run time) if my application is running in partial-trust mode or not? I'm considering deploying two versions of my ClickOnce application - one full trust and the other partial trust and there are some things I want to do differently depending on the deployment mode (such as caching downloaded images on full-trust)

I've already looked into using Isolated Storage, but apparently you're limited to 10K for storage: not good for image caching!

Was it helpful?

Solution

We create a folder in the LocalApplicationData with our company name and store cached files and information there. This is where Microsoft recommended you put data when Vista came out, because you could no longer write it to Program Files as so many developers did.

Here's an article about it (we use it for data too): Where do I put my data to keep it safe from ClickOnce updates?

You can store information in LocalApplicationData regardless of whether the application is full trust or partial trust.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top