Skip to content

Commit 6b1d336

Browse files
Mikejo5000denrea
andauthored
Refactor ClickOnce articles describing configuration in the Wizard (#11516)
* Refactor ClickOnce security settings * removed files * TOC updates * link updates * minor edit * TOC updates * TOC updates * TOC updates * tweak * link fixes * Correct typo: is display > is displayed --------- Co-authored-by: Dennis Rea <[email protected]>
1 parent dbb94c6 commit 6b1d336

17 files changed

+250
-388
lines changed

.openpublishing.redirection.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "docs/deployment/how-to-automatically-increment-the-clickonce-publish-version.md",
5+
"redirect_url": "/visualstudio/deployment/how-to-specify-where-visual-studio-copies-the-files",
6+
"redirect_document_id": false
7+
},
8+
{
9+
"source_path": "docs/deployment/how-to-set-the-clickonce-publish-version.md",
10+
"redirect_url": "/visualstudio/deployment/how-to-specify-where-visual-studio-copies-the-files",
11+
"redirect_document_id": false
12+
},
13+
{
14+
"source_path": "docs/deployment/how-to-specify-the-clickonce-offline-or-online-install-mode.md",
15+
"redirect_url": "/visualstudio/deployment/how-to-specify-where-visual-studio-copies-the-files",
16+
"redirect_document_id": false
17+
},
18+
{
19+
"source_path": "docs/deployment/how-to-specify-the-location-where-end-users-will-install-from.md",
20+
"redirect_url": "/visualstudio/deployment/how-to-specify-where-visual-studio-copies-the-files",
21+
"redirect_document_id": false
22+
},
23+
{
24+
"source_path": "docs/deployment/how-to-set-a-security-zone-for-a-clickonce-application.md",
25+
"redirect_url": "/visualstudio/deployment/how-to-enable-clickonce-security-settings",
26+
"redirect_document_id": false
27+
},
28+
{
29+
"source_path": "docs/deployment/how-to-set-custom-permissions-for-a-clickonce-application.md",
30+
"redirect_url": "/visualstudio/deployment/how-to-enable-clickonce-security-settings",
31+
"redirect_document_id": false
32+
},
333
{
434
"source_path": "docs/deployment/azure-deployment-using-github-actions.md",
535
"redirect_url": "/visualstudio/azure/azure-deployment-using-github-actions",

docs/deployment/code-access-security-for-clickonce-applications.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ ClickOnce applications are based on the .NET Framework and are subject to code a
9292

9393
## See also
9494
- [Secure ClickOnce applications](../deployment/securing-clickonce-applications.md)
95-
- [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)
9999
- [Trusted application deployment overview](../deployment/trusted-application-deployment-overview.md)
100100
- [Security Page, Project Designer](../ide/reference/security-page-project-designer.md)

docs/deployment/how-to-add-a-trusted-publisher-to-a-client-computer-for-clickonce-applications.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ With Trusted Application Deployment, you can configure client computers so that
6060
- [Code access security for ClickOnce applications](../deployment/code-access-security-for-clickonce-applications.md)
6161
- [ClickOnce and Authenticode](../deployment/clickonce-and-authenticode.md)
6262
- [Trusted application deployment overview](../deployment/trusted-application-deployment-overview.md)
63-
- [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)

docs/deployment/how-to-automatically-increment-the-clickonce-publish-version.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/deployment/how-to-configure-the-clickonce-trust-prompt-behavior.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can configure the ClickOnce trust prompt to control whether end users are gi
3030

3131
|Option|Registry setting value|Description|
3232
|------------|----------------------------|-----------------|
33-
|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.|
3434
|Restrict the trust prompt.|`AuthenticodeRequired`|The ClickOnce trust prompt is only displayed if ClickOnce applications are signed with a certificate that identifies the publisher.|
3535
|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.|
3636

@@ -234,9 +234,9 @@ You can configure the ClickOnce trust prompt to control whether end users are gi
234234
- [Code access security for ClickOnce applications](../deployment/code-access-security-for-clickonce-applications.md)
235235
- [ClickOnce and Authenticode](../deployment/clickonce-and-authenticode.md)
236236
- [Trusted application deployment overview](../deployment/trusted-application-deployment-overview.md)
237-
- [How to: Enable ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
238-
- [How to: Set a security zone for a ClickOnce application](../deployment/how-to-set-a-security-zone-for-a-clickonce-application.md)
239-
- [How to: Set custom permissions for a ClickOnce application](../deployment/how-to-set-custom-permissions-for-a-clickonce-application.md)
240-
- [How to: Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
241-
- [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)
242-
- [How to: Re-sign application and deployment manifests](../deployment/how-to-re-sign-application-and-deployment-manifests.md)
237+
- [Enable and configure ClickOnce security settings](../deployment/how-to-enable-clickonce-security-settings.md)
238+
- [Set a security zone for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-a-security-zone-for-a-clickonce-application)
239+
- [Set custom permissions for a ClickOnce application](../deployment/how-to-enable-clickonce-security-settings.md#set-custom-permissions-for-a-clickonce-application)
240+
- [Debug a ClickOnce application with restricted permissions](securing-clickonce-applications.md)
241+
- [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)
242+
- [Re-sign application and deployment manifests](../deployment/how-to-re-sign-application-and-deployment-manifests.md)

docs/deployment/how-to-enable-clickonce-security-settings.md

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Enable ClickOnce Security Settings | Microsoft Docs
2+
title: Enable & configure ClickOnce security | Microsoft Docs
33
description: Learn how the Publish wizard automatically enables code access security for ClickOnce applications to publish the application.
4-
ms.date: 11/04/2016
4+
ms.date: 08/04/2023
55
ms.topic: how-to
66
dev_langs:
77
- VB
@@ -19,18 +19,21 @@ ms.technology: vs-ide-deployment
1919
ms.workload:
2020
- multiple
2121
---
22-
# How to: Enable ClickOnce security settings
22+
# How to: Enable and configure ClickOnce security settings in Visual Studio
2323

2424
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
25-
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.
2825

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.
3027

3128
[!INCLUDE[ndptecclick](../deployment/includes/dotnet-task-unsupported.md)]
3229

33-
### To enable ClickOnce security settings
30+
## Enable ClickOnce security settings
31+
32+
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**.
3437

3538
1. With a project selected in **Solution Explorer**, on the **Project** menu, click **Properties**.
3639

@@ -56,6 +59,54 @@ Code access security for ClickOnce applications must be enabled in order to publ
5659
> [!NOTE]
5760
> 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.
5861
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.
108+
59109
## See also
110+
60111
- [Secure ClickOnce applications](../deployment/securing-clickonce-applications.md)
61112
- [Code access security for ClickOnce applications](../deployment/code-access-security-for-clickonce-applications.md)

docs/deployment/how-to-re-sign-application-and-deployment-manifests.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ After you make changes to deployment properties in the application manifest for
117117
- [Code access security for ClickOnce applications](../deployment/code-access-security-for-clickonce-applications.md)
118118
- [ClickOnce and Authenticode](../deployment/clickonce-and-authenticode.md)
119119
- [Trusted application deployment overview](../deployment/trusted-application-deployment-overview.md)
120-
- [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)

docs/deployment/how-to-set-a-security-zone-for-a-clickonce-application.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)