vb.net 加载此程序集将产生与其他实例不同的授权集

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18168465/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 14:36:26  来源:igfitidea点击:

Loading this assembly would produce a different grant set from other instances

c#asp.net.netvb.net.net-assembly

提问by user2580179

I am getting following error at run-time "Loading this assembly would produce a different grant set from other instances" when calling a vb.net 1.1 assembly from a ASP.net 2.0 website. Any idea what could be the reason behind this error?

从 ASP.net 2.0 网站调用 vb.net 1.1 程序集时,我在运行时遇到以下错误“加载此程序集将产生与其他实例不同的授权集”。知道这个错误背后的原因是什么吗?

The scenario is :

场景是:

There is one web application which is built as WebSite in ASP.NET 2.0. The webpages in this website loads a 2.0 vb.net assembly, which inturn to load a 1.1 vb.net assembly.

有一个在 ASP.NET 2.0 中构建为 WebSite 的 Web 应用程序。本网站中的网页加载 2.0 vb.net 程序集,然后加载 1.1 vb.net 程序集。

The code is failing at run time, in loading the assembly of 1.1 dll. Please help.

代码在运行时失败,无法加载 1.1 dll 的程序集。请帮忙。

回答by Joshua Mee

I had this error when I installed .NET 4.5.1.

我在安装 .NET 4.5.1 时遇到了这个错误。

I fixed it by deleting the .suo files in my solution folder (you may have to show hidden files to see them).

我通过删除解决方案文件夹中的 .suo 文件来修复它(您可能需要显示隐藏文件才能看到它们)。

Next time I started it up everything was back to normal.

下次我启动它时,一切都恢复正常。

回答by jurik

I've been searching for weeks now and found the culprit.

我已经搜索了数周并找到了罪魁祸首。

In my case it was a new code signing certificate in the solution with the old one in my local certificate store.

在我的情况下,它是解决方案中的新代码签名证书,而我的本地证书存储中的旧证书。

When i installed the new certificate the error disappeared.

当我安装新证书时,错误消失了。