title | ms.custom | ms.date | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | author | ms.author | manager | ms.workload | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Set custom permissions (ClickOnce app) |
SEO-VS-2020 |
11/04/2016 |
how-to |
|
|
660459ca-ef73-44a8-b323-610001f63b93 |
mikejo5000 |
mikejo |
jillfra |
|
You can deploy a [!INCLUDEndptecclick] 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.
-
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.
-
Select the This is a partial trust application option button.
The controls in the ClickOnce security permissions section are enabled.
-
From the Zone your application will be installed from drop-down list, click (Custom).
-
Click Edit Permissions XML.
The app.manifest file opens in the XML Editor.
-
Before the
</applicationRequestMinimum>
element, add XML code for permissions that your application requires.[!NOTE] 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.