Asp.net '的类型初始值设定项;DevExpress.XtraReports.UI.XtraReport';抛出异常
我正在开发一个网站,我需要在其中显示停靠报告 使用.NETFramework3.5可以很好地工作,但是当升级到Framework4.0时,代码中出现了以下错误Asp.net '的类型初始值设定项;DevExpress.XtraReports.UI.XtraReport';抛出异常,asp.net,report,Asp.net,Report,我正在开发一个网站,我需要在其中显示停靠报告 使用.NETFramework3.5可以很好地工作,但是当升级到Framework4.0时,代码中出现了以下错误 The type initializer for 'DevExpress.XtraReports.UI.XtraReport' threw an exception. 在浏览器中,我得到一个错误 This method explicitly uses CAS policy, which has been obsoleted by the
The type initializer for 'DevExpress.XtraReports.UI.XtraReport' threw an exception.
在浏览器中,我得到一个错误
This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
请让我知道如何解决这个问题
谢谢我通过在system.web标记下的web.config文件中添加以下元素解决了这个问题
<trust legacyCasModel="true"/>
参考链接