zoukankan      html  css  js  c++  java
  • office加载项部署清单签名的证书或其位置不受信任

    异常信息:

    System.Security.SecurityException: 此应用程序中的自定义功能将不起作用,原因是用于为 BIMT写作指导 的部署清单签名的证书或其位置不受信任。请向管理员寻求进一步帮助。
    在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
    在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
    在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName)
    在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.ProcessSHA1Manifest(ActivationContext context, DeploymentSignatureInformation signatureInformation, PermissionSet permissionsRequested, Uri manifest, ManifestSignatureInformationCollection signatures, AddInInstallationStatus installState)
    在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
    在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
    失败的程序集的区域是:
    MyComputer

    异常截图:

    结觉方案:

     1  private void button1_Click(object sender, EventArgs e)
     2         {
     3             try//32位
     4             {
     5                 Microsoft.Win32.RegistryKey key;
     6                 key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"SOFTWAREMICROSOFT.NETFrameworkSecurityTrustManagerPromptingLevel");
     7 
     8                 key.SetValue("MyComputer", "Enabled");
     9                 key.SetValue("LocalIntranet", "Enabled");
    10                 key.SetValue("Internet", "Enabled");
    11                 key.SetValue("TrustedSites", "Enabled");
    12                 key.SetValue("UntrustedSites", "Enabled");
    13                 key.Close();
    14                 MessageBox.Show("Security Reg Done!");
    15             }
    16             catch (Exception ex)
    17             {
    18                 MessageBox.Show(ex.Message);
    19             }
    20         }
    21 
    22         private void button2_Click(object sender, EventArgs e)
    23         {
    24             try//64位
    25             {
    26                 Microsoft.Win32.RegistryKey key;
    27                 key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"SOFTWAREWow6432NodeMICROSOFT.NETFrameworkSecurityTrustManagerPromptingLevel");
    28 
    29                 key.SetValue("MyComputer", "Enabled");
    30                 key.SetValue("LocalIntranet", "Enabled");
    31                 key.SetValue("Internet", "Enabled");
    32                 key.SetValue("TrustedSites", "Enabled");
    33                 key.SetValue("UntrustedSites", "Enabled");
    34                 key.Close();
    35                 MessageBox.Show("Security Reg Done!");
    36             }
    37             catch (Exception ex)
    38             {
    39                 MessageBox.Show(ex.Message);
    40             }
    41         }

    软件下载地址:http://pan.baidu.com/s/1jH3Rc1o

    msdn说明:https://msdn.microsoft.com/zh-cn/library/ms996418.aspx

  • 相关阅读:
    PHP添加Redis模块及连接
    Redis高级应用
    Redis常用命令
    Redis的数据类型及操作
    Redis下载及安装部署
    NoSQL介绍
    8种Nosql数据库系统对比
    JQ插件
    libcurl一般用法
    密钥对加密原理
  • 原文地址:https://www.cnblogs.com/wuhailong/p/5600377.html
Copyright © 2011-2022 走看看