我希望这能帮助我解决这个问题。
我有一个应用程序(winforms)构建与.net framework 4.5
和ReportViewer 11 (reportv Viewer 2012)的问题。几个星期前,我使用Windows Azure部署并安装到客户端,但是当我运行报告时,显示了一个异常。
**An error occurred during local report processing.
Failed to load expression host assembly. Details: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)**
当我在网络(LAN)中部署时工作正常,但是当我通过互联网部署时,我得到此错误,此错误仅在我通过快捷方式.appref-ms启动应用程序时发生,但如果我启动应用程序执行.exe文件显示报告正确。
其他人有这个问题,如何解决?
谢谢。
我找到我的问题了。
我解决这个只注释这一行,因为我不使用ngen;)。我只是在Main方法中注释属性[LoaderOptimization(LoaderOptimization. multidomainhost)]。这对我来说很好,检查你是否有和评论;)。