As a developer, it is your responsibility to make sure that your application will run with the appropriate permissions.
Note: |
|---|
Visual Studio enables you to debug your application in the target security zone and provides help in developing secure applications.
|
There are cases where a ClickOnce application may require elevated permissions. For example, an application that has to interact with an Excel spreadsheet would require permissions beyond those defined for the Internet or Intranet zones. If an application requires elevated permissions, the user will be prompted during installation to grant permission. If the user accepts, the application will be installed; if not, the installation will be stopped.
Note: |
|---|
To prevent users from being prompted, a System Administrator can specify a
ClickOnce deployment policy that defines a specific application publisher as a trusted source. On computers where this policy is deployed, permissions will automatically be granted and the user will not be prompted.
|
Permissions for an application are determined by the settings in the <trustInfo> Element (ClickOnce Application) element of the application manifest. Visual Studio automatically generates this information based on the settings on the project's Security property page. A ClickOnce application is granted only the specific permissions that it requests. For example, where file access requires full-trust permissions, if the application requests file-access permission, it will only be granted file-access permission, not full-trust permissions. When developing your ClickOnce application, you should make sure that you request only the specific permissions that the application needs.
In addition, the deployment manifest should be signed using Authenticode signing. Publisher information based on the Authenticode signature will be displayed to the user in the permissions dialog box during installation, to show the user that the application originated from a trusted source. The Windows Software Development Kit (SDK) includes a file-signing tool, Sign Tool (SignTool.exe), that enables you to sign the manifest. (Note that the signing tool signcode.exe has been deprecated.)
Note: |
|---|
Signing functionality, available in Visual Studio 2003 and earlier versions, has been removed from
Setup and Deployment projects (Setup projects, Web Setup projects, Cab projects, and Merge Modules). If you have imported a Visual Studio 2003 project with signing enabled into Visual Studio 2005, or if you want to enable signing for your deployment project, you will have to sign the files in the build output with Sign Tool (SignTool.exe) in a post-build step. For information about how to do this, see The file '<file>' was not signed.
|