将AddTrustedCodeModuleInCurrentAppDomain转换为VS2010的AddFullTrustModuleInSandboxAppDomain [英] Converting AddTrustedCodeModuleInCurrentAppDomain to AddFullTrustModuleInSandboxAppDomain for VS2010

查看:152
本文介绍了将AddTrustedCodeModuleInCurrentAppDomain转换为VS2010的AddFullTrustModuleInSandboxAppDomain的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有人有一个使用新方法AddFullTrustModuleInSandboxAppDomain替​​换VS2010中的AddTrustedCodeModuleInCurrentAppDomain的示例?我似乎无法使其发挥作用。现有代码如下所示:



 Me.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain(" System.Drawing,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a")

谢谢,


标记


解决方案


经过进一步测试,我可以让它工作定位框架4.0。在不使用NetFx40_LegacySecurityPolicy的情况下定位Framework 3.5时是否有任何方法可以使其工作?


谢谢,


标记


Hi,

Does anyone have an example of using the new method AddFullTrustModuleInSandboxAppDomain that replaces AddTrustedCodeModuleInCurrentAppDomain in VS2010? I can't seem to make it work. The existing code looks like this:

Me.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

Thanks,

Mark

解决方案

Hi,

Upon further testing, I can get it to work targeting Framework 4.0. Is the any way to get it to work when targeting Framework 3.5 without using NetFx40_LegacySecurityPolicy?

Thanks,

Mark


这篇关于将AddTrustedCodeModuleInCurrentAppDomain转换为VS2010的AddFullTrustModuleInSandboxAppDomain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆