Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

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.

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

like image 876
user2580179 Avatar asked Aug 11 '13 03:08

user2580179


2 Answers

I had this error when I installed .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).

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

like image 56
Joshua Mee Avatar answered Nov 06 '22 14:11

Joshua Mee


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.

like image 24
jurik Avatar answered Nov 06 '22 13:11

jurik