How to: Set a security zone for a ClickOnce application (如何:設定 ClickOnce 應用程式的安全性區域)How to: Set a security zone for a ClickOnce application

設定 ClickOnce 應用程式的程式碼存取安全性權限時,必須從 [專案設計工具] **** 之 [安全性] **** 頁面上的一組基底權限開始。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.

在大多數情況下,您也可以選擇 [網際網路] **** 區域 (包含一組有限的權限) 或 [近端內部網路] **** 區域 (包含一組更高的權限)。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. 如需設定自訂權限的詳細資訊,請參閱 如何:設定 ClickOnce 應用程式的自訂使用權限For more information about setting custom permissions, see How to: Set Custom Permissions for a ClickOnce Application.

設定安全性區域To set a security zone

  1. 方案總管中選取專案時,在 [ 專案 ] 功能表上按一下 [ 屬性]。With a project selected in Solution Explorer, on the Project menu click Properties.

  2. 按一下 [安全性] 索引標籤。Click the Security tab.

  3. 選取 [啟用 ClickOnce 安全性設定] **** 核取方塊。Select the Enable ClickOnce Security Settings check box.

  4. 選取 [這是部分信任的應用程式] **** 選項按鈕。Select the This is a partial trust application option button.

    這會啟用 [ClickOnce 安全性權限] **** 區段中的控制項。The controls in the ClickOnce security permissions section are enabled.

  5. 在 [安裝應用程式的區域] **** 下拉式清單中,選取安全性區域。In the Zone your application will be installed from drop-down list, select a security zone.

另請參閱See also