使用 regasm 进行位于 UNC 共享的框架 4.0 程序集

发布于 2024-09-09 18:03:47 字数 204 浏览 1 评论 0原文

我正在尝试使用 regasm 实用程序注册 .Net 4.0 编译的二进制文件。此 ComInterOp 组件必须部署在网络共享上,并且尝试从共享注册失败,并出现错误“无法加载文件或程序集或依赖项之一”。 (如果二进制文件位于本地驱动器上,则注册有效)。可能是代码访问安全问题,有没有办法为framework 4.0程序集设置它?我尝试过 4.0 框架附带的 Caspol.exe,但没有帮助。

I am trying to register a .Net 4.0 compiled binary using regasm utillity. This ComInterOp assemply has to be deployed on a network share, and trying to register from the share fails with the error "Cound not load file or assembly or one of the dependecies". (registration works if the binary is on a local drive). It may be Code access security issue, is there a way to set it for framework 4.0 assembly? I have tried Caspol.exe that ships with 4.0 framework but it did not help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦幻之岛 2024-09-16 18:03:47

这实际上是由于安全设置造成的。最简单的解决方案是更改 regasm.config 文件以包含 loadFromRemoteSources 元素,以便信任网络共享:

http://msdn.microsoft.com/en-us/library/dd409252(VS.100).aspx

This is in fact due to security settings. The easiest solution is to change the regasm.config file to include the loadFromRemoteSources element so that the network share will be trusted:

http://msdn.microsoft.com/en-us/library/dd409252(VS.100).aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文