You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[How to: Enable ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
96
-
-[How to: Set a security zone for a ClickOnce application](../deployment/how-to-set-a-security-zone-for-a-clickonce-application.md)
97
-
-[How to: Set custom permissions for a ClickOnce application](../deployment/how-to-set-custom-permissions-for-a-clickonce-application.md)
98
-
-[How to: Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
95
+
-[Enable and configure ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
96
+
-[Set a security zone for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-a-security-zone-for-a-clickonce-application)
97
+
-[Set custom permissions for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-custom-permissions-for-a-clickonce-application)
98
+
-[Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
-[How to: Enable ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
64
-
-[How to: Set a security zone for a ClickOnce application](../deployment/how-to-set-a-security-zone-for-a-clickonce-application.md)
65
-
-[How to: Set custom permissions for a ClickOnce application](../deployment/how-to-set-custom-permissions-for-a-clickonce-application.md)
66
-
-[How to: Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
67
-
-[How to: Add a trusted publisher to a client computer for ClickOnce applications](../deployment/how-to-add-a-trusted-publisher-to-a-client-computer-for-clickonce-applications.md)
68
-
-[How to: Re-sign application and deployment manifests](../deployment/how-to-re-sign-application-and-deployment-manifests.md)
69
-
-[How to: Configure the ClickOnce trust prompt behavior](../deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md)
63
+
-[Enable and configure ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
64
+
-[Set a security zone for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-a-security-zone-for-a-clickonce-application.md)
65
+
-[Set custom permissions for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-custom-permissions-for-a-clickonce-application)
66
+
-[Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
67
+
-[Add a trusted publisher to a client computer for ClickOnce applications](../deployment/how-to-add-a-trusted-publisher-to-a-client-computer-for-clickonce-applications.md)
68
+
-[Re-sign application and deployment manifests](../deployment/how-to-re-sign-application-and-deployment-manifests.md)
69
+
-[Configure the ClickOnce trust prompt behavior](../deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md)
|Enable the trust prompt.|`Enabled`|The ClickOnce trust prompt is display so that end users can grant trust to ClickOnce applications.|
33
+
|Enable the trust prompt.|`Enabled`|The ClickOnce trust prompt is displayed so that end users can grant trust to ClickOnce applications.|
34
34
|Restrict the trust prompt.|`AuthenticodeRequired`|The ClickOnce trust prompt is only displayed if ClickOnce applications are signed with a certificate that identifies the publisher.|
35
35
|Disable the trust prompt.|`Disabled`|The ClickOnce trust prompt is not displayed for any ClickOnce applications that are not signed with an explicitly trusted certificate.|
36
36
@@ -234,9 +234,9 @@ You can configure the ClickOnce trust prompt to control whether end users are gi
Code access security for ClickOnce applications must be enabled in order to publish the application. This is done automatically when you publish an application using the Publish wizard.
26
-
27
-
In some cases, enabling code access security can impact performance when building or debugging your application; in these cases, you may wish to temporarily disable the security settings.
28
25
29
-
ClickOnce security settings can be enabled or disabled on the **Security** page of the **Project Designer**.
26
+
You can enable and configure ClickOnce security settings in the **Security** page of the **Project Designer**. In this article, you learn how to enable security settings, configure security zones, and configure customized security zones.
Code access security for ClickOnce applications must be enabled in order to publish the application. This is done automatically when you publish an application using the Publish wizard.
33
+
34
+
In some cases, enabling code access security can impact performance when building or debugging your application; in these cases, you may wish to temporarily disable the security settings.
35
+
36
+
ClickOnce security settings can be enabled or disabled on the **Security** page of the **Project Designer**.
34
37
35
38
1. With a project selected in **Solution Explorer**, on the **Project** menu, click **Properties**.
36
39
@@ -56,6 +59,54 @@ Code access security for ClickOnce applications must be enabled in order to publ
56
59
> [!NOTE]
57
60
> Each time the application is published with the Publish wizard, this check box will be selected; you must clear it again after each successful publish.
58
61
62
+
## Set a security zone for a ClickOnce application
63
+
64
+
When setting code access security permissions for a ClickOnce application, you need to start with a base set of permissions on the **Security** page of the **Project Designer**.
65
+
66
+
In most cases, you can also choose the **Internet** zone which contains a limited set of permissions, or the **Local Intranet** zone which contains a greater set of permissions. If your application requires custom permissions, you can do so by choosing the [Custom security zone](#set-custom-permissions-for-a-clickonce-application).
67
+
68
+
### To set a security zone
69
+
70
+
1. With a project selected in **Solution Explorer**, on the **Project** menu click **Properties**.
71
+
72
+
2. Click the **Security** tab.
73
+
74
+
3. Select the **Enable ClickOnce Security Settings** check box.
75
+
76
+
4. Select the **This is a partial trust application** option button.
77
+
78
+
The controls in the **ClickOnce security permissions** section are enabled.
79
+
80
+
5. In the **Zone your application will be installed from** drop-down list, select a security zone.
81
+
82
+
## Set custom permissions for a ClickOnce application
83
+
84
+
You can deploy a [!INCLUDE[ndptecclick](../deployment/includes/ndptecclick_md.md)] application that uses default permissions for the Internet or Local Intranet zones. Alternatively, you can create a custom zone for the specific permissions that the application needs. You can do this by customizing the security permissions on the **Security** page of the **Project Designer**.
85
+
86
+
### To customize a permission
87
+
88
+
1. With a project selected in **Solution Explorer**, on the **Project** menu, click **Properties**.
89
+
90
+
2. Click the **Security** tab.
91
+
92
+
3. Select the **Enable ClickOnce Security Settings** check box.
93
+
94
+
4. Select the **This is a partial trust application** option button.
95
+
96
+
The controls in the **ClickOnce security permissions** section are enabled.
97
+
98
+
5. From the **Zone your application will be installed from** drop-down list, click **(Custom)**.
99
+
100
+
6. Click **Edit Permissions XML**.
101
+
102
+
The *app.manifest* file opens in the XML Editor.
103
+
104
+
7. Before the `</applicationRequestMinimum>` element, add XML code for permissions that your application requires.
105
+
106
+
> [!NOTE]
107
+
> You can use the `ToXml` method of a permission set to generate the XML code for the application manifest. For example, to generate the XML for the <xref:System.Security.Permissions.EnvironmentPermission> permission set, call the <xref:System.Security.Permissions.EnvironmentPermission.ToXml%2A> method.
- [How to: Enable ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
121
-
- [How to: Set a security zone for a ClickOnce application](../deployment/how-to-set-a-security-zone-for-a-clickonce-application.md)
122
-
- [How to: Set custom permissions for a ClickOnce application](../deployment/how-to-set-custom-permissions-for-a-clickonce-application.md)
123
-
- [How to: Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
124
-
- [How to: Add a trusted publisher to a client computer for ClickOnce applications](../deployment/how-to-add-a-trusted-publisher-to-a-client-computer-for-clickonce-applications.md)
125
-
- [How to: Configure the ClickOnce trust prompt behavior](../deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md)
120
+
- [Enable and configure ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
121
+
- [Set a security zone for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-a-security-zone-for-a-clickonce-application)
122
+
- [Set custom permissions for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-custom-permissions-for-a-clickonce-application)
123
+
- [Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
124
+
- [Add a trusted publisher to a client computer for ClickOnce applications](../deployment/how-to-add-a-trusted-publisher-to-a-client-computer-for-clickonce-applications.md)
125
+
- [Configure the ClickOnce trust prompt behavior](../deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md)
0 commit comments