我正在开发一个网站,我需要在其中显示停靠的报告
使用.Net framework 3.5,它的工作正常但是当升级到框架4.0时,我在代码中遇到以下错误。
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.
请让我知道如何解决这个问题。
谢谢
答案 0 :(得分:0)
我通过在system.web标记
下的web.config文件中添加以下元素解决了这个问题<trust legacyCasModel="true"/>
参考链接