今天要執行自己發佈的程式,給我出現這個圖案:
錯誤訊息內容:
「由於這個應用程式可能會對您的電腦造成安全性風險,因此系統管理員已將它封鎖 」
「您的安全性設定不允許這個應用程式安裝在您的電腦上」
搜尋上面關鍵字,完全沒有解決方案
後來搜尋關鍵字:
「clickonce security warning Administrator」
google好厲害,語意分析結果,給了我答案
unable-to-install-clickonce-application-due-to-security-settings-windows-10
告訴你,去Microsoft網站上找答案:
How to: Configure the ClickOnce Trust Prompt Behavior
https://msdn.microsoft.com/en-us/library/ee308453.aspx
答案就是:
.net要設定安全性
改為To disable the ClickOnce trust prompt by using the registry editor
- Open the registry editor:
- Click Start, and then click Run.
- In the Open box, type
regedit, and then click OK.- Find the following registry key:
\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\.NETFramework\Security\TrustManager\PromptingLevel
If the key does not exist, create it.- Add the following subkeys as String Value, if they do not already exist, with the associated values shown in the following table.
String Value subkey Value UntrustedSitesDisabledInternetDisabledMyComputerDisabledLocalIntranetDisabledTrustedSitesDisabled
Enabled另外,裡面有一個 TrustedSites,那個地方的設定在