VSTO Excel 2007加载项无法从网络共享安装

问题描述 投票:13回答:3

我有一个在网络共享上发布的VSTO插件。在我公司,每个人都可以从网络共享中安装和更新此应用程序。在域之外,我无法安装此定制。我收到以下错误:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9nVE5YTy5wbmcifQ==” alt =“安装错误屏幕截图”>

详细信息:

************** Exception Text **************
System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for flow or its location is not trusted. Contact your administrator for further assistance.
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
The Zone of the assembly that failed was:
MyComputer

我首先认为这是证书有问题。因此,我将证书明确安装在客户端计算机上。那没有解决。当我复制flow目录到我的桌面时,我可以毫无问题地安装和运行插件。因此,似乎网络文件夹不是受信任的位置。我将路径Z:/Software/Flow/添加到Excel选项中的受信任位置。此路径自动解析为完整路径// server / data / software / flow /。但这并没有任何改变。有人看过吗?

.net excel clickonce vsto
3个回答
10
投票

I found解决方案。基本上,我将网络共享定义为Intranet区域中的受信任站点。


0
投票

您添加到受信任位置的路径?

如果不是“ Z:\ Software \ Flow \”,您是否也选中了“此位置的子文件夹也是受信任的”选项?


0
投票

Enable the ClickOnce trust prompt

当希望向最终用户展示安装和运行来自该区域的任何ClickOnce应用程序的选项时,为该区域启用信任提示。

通过使用注册表编辑器来启用ClickOnce信任提示
  1. 打开注册表编辑器:

    1. 单击开始,然后单击运行

    2. 打开框中,键入regedit,然后单击确定

  2. 查找以下注册表项:

    \ HKEY_LOCAL_MACHINE \ SOFTWARE \ MICROSOFT.NETFramework \ Security \ TrustManager \ PromptingLevel

    如果密钥不存在,请创建它。

  3. 如果以下子项不存在,则将其添加为字符串值,并在下表中显示相关的值。

+---------------------+----------+
| String Value subkey | Value    |
+---------------------+----------+
| Internet            | Enabled  |
+---------------------+----------+
| UntrustedSites      | Disabled |
+---------------------+----------+
| MyComputer          | Enabled  |
+---------------------+----------+
| LocalIntranet       | Enabled  |
+---------------------+----------+
| TrustedSites        | Enabled  |
+---------------------+----------+
© www.soinside.com 2019 - 2024. All rights reserved.