Udostępnij za pośrednictwem


How to: Enable ClickOnce Security Settings

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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.

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.

ClickOnce security settings can be enabled or disabled on the Security page of the Project Designer.

To enable ClickOnce security settings

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

  2. Click the Security tab.

  3. Select the Enable ClickOnce Security Settings check box.

    You can now customize the security settings for your application on the Security page.

    Note

    This check box is automatically selected each time the application is published with the Publish wizard.

To disable ClickOnce security settings

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

  2. Click the Security tab.

  3. Clear the Enable ClickOnce Security Settings check box.

    Your application will be run with the full trust security settings; any settings on the Security page will be ignored.

    Note

    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.

See Also

Securing ClickOnce Applications
Code Access Security for ClickOnce Applications
Securing ClickOnce Applications