VSTO签署程序集,而不是部署

编程入门 行业动态 更新时间:2024-10-25 13:16:53
本文介绍了VSTO签署程序集,而不是部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好!

我有一个excel-template,通过click-once发布到UNC-share。我使用来自域的根证书签署了一次点击一次部署。此证书显示在计算机的信息存储(可信发布者)中。 UNC-Share在信托中心列为作为受信任位置。

I have an excel-template which is published via click-once to an UNC-share. I signed the click-once-deployment with a root-certificate from our domain. This certificate appears in the computer's information store (trusted publishers). The UNC-Share is listed as a trusted location in the trust center.

当用户基于此excel模板创建新的Excel工作表时,代码将被执行为预期,因为工作表是从受信任的位置打开的。

When an user creates a new excel-sheet based on this excel-template the code is executed as expected, because the sheet is opened from a trusted location.

当用户将excel表保存在文件系统中时(分配有驱动器号的网络驱动器)并重新打开excel-sheet,代码未执行(不受信任的位置)。将工作表保存在本地驱动器上时,将执行代码(受信任位置)。

When the user saves the excel-sheet in the file-system (network drives assigned with drive-letters) and re-opens the excel-sheet, the code is not executed (not trusted location). When the sheet is saved on the local drive, the code is executed (trusted location).

我知道我不仅需要签署部署,还要签署程序集。 Visual Studio的GUI提供了仅使用.pfx或.snk-证书对程序集进行签名的可能性,但我有一个sha1RSA证书。所以我尝试使用 signtool对程序集进行签名,但这不起作用,因为.vsto-manife中的哈希值发生了变化。

I know that I have to sign not only the doployment, but also the assembly. The GUI of Visual Studio offers the possibility to sign the assembly with a .pfx or .snk-certificate only, but I have a sha1RSA-certificate. So I tried to sign the assemblies with signtool, but this did not work because the hash in the .vsto-manifests gets changed.

如何签署程序集以获取我的代码在从这样一个不受信任的位置打开工作簿时运行?

How can I sign the assembly to get my code running when the workbook is opened from such a non-trusted-location?

谢谢

Chris

推荐答案

根据您的问题,请参考我认为有用的这个帖子。

Based on your issue , please refer to this thread I think would be helpful.

social.msdn.microsoft/forums/en-us/ vsto / thread / A42BB2E8-9E9C-494E-A5CA-7CD10475231B

更多推荐

VSTO签署程序集,而不是部署

本文发布于:2023-05-29 23:05:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/355029.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而不是   程序   VSTO

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!