will help you Looking at the documentation from Microsoft in regards to allowing Partially Trusted Callers to Full Trust Assemblies I do not believe that this is going to be possible to do. You keep stressing that we need to avoid the security concerns, but in all reality, what you are trying to do with your solution is bypass essentially every single portion of the code access security system within the .NET Framework, and I'll be hard pressed to believe that you are going to be able to get a viable solution.
Error when building and debugging project in Visual Studio: Loading this assembly would produce a different grant set fr
Hope that helps I was facing the same issue. Following are the steps which sorted my issue: In Website web config file Changed identity impersonate="true" to identity impersonate="False" rebuild it & again changed it to identity impersonate="False" to identity impersonate="True" Closed the application. Delete temporary Internet files(V18.104.22.168 as I was using VS 2010). Restarted IIS. Opened Application & rebuild it. Build Succeeded.
Loading same Assembly with different versions and instnatiating multiple .xaml instances
wish help you to fix your issue After a week suffering and laboring with this issue, I finally found both the reason for the problem and its solution. The problem lies within the auto-generated *.g.i.cs file, which is called by the InitializeComponent() method of a UserControl, as seen by the following:
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances
it fixes the issue I had this problem too, but after days of searching I found the solution! Turns out in my case, If you have SCOM (Microsoft Server Monitoring Software) installed on the server, it somehow messes with the installation of Umbraco Packages. We uninstalled SCOM, and could install packages again! Check out this link on the Umbraco Forum for more details, including a link to a blog that might give details to a work around.
Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)