How to: Determine the Permissions for a ClickOnce Application
Although you can deploy a ClickOnce application with default permissions, it is a good practice to restrict the application to only those permissions that it actually needs. You can analyze your application to determine which permissions it needs by running the Permission Calculator tool, accessible from the Security page of the Project Designer.
Note
There are some limitations to the Permission Calculator tool. The tool performs a static analysis of the code and cannot determine permissions required for late-bound code or for dynamically loaded assemblies. In addition, if you have designed your application to dynamically modify its permission demands when running in an environment with lesser permissions, the tool will report the maximum required permissions.
To determine permissions for an application
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Security tab.
Select the Enable ClickOnce Security Settings check box.
Click the Calculate Permissions button.
Note
Any existing permission settings will be overwritten.
The Permission Calculator will analyze the application; on completion the Permissions required by the application table will be updated to reflect the permissions used by the application.
Note
For large projects, this process could take several minutes.
See Also
Tasks
How to: Set Custom Permissions for a ClickOnce Application
Concepts
Code Access Security for ClickOnce Applications
ClickOnce Deployment and Security