开发者

The type initializer for 'DevExpress.XtraReports.UI.XtraReport' threw an exception

开发者 https://www.devze.com 2023-03-19 03:57 出处:网络
I\'m developing a website in which I need to show dock开发者_JAVA百科ed reports With .Net framework 3.5 its working fine but when upgraded to framework 4.0 I\'m getting the following error in the cod

I'm developing a website in which I need to show dock开发者_JAVA百科ed reports

With .Net framework 3.5 its working fine but when upgraded to framework 4.0 I'm getting the following error in the code.

The type initializer for 'DevExpress.XtraReports.UI.XtraReport' threw an exception.

and in the browser, I'm getting an error as

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.

Please let me know how to solve this issue.

Thanks


I solved the issue by adding following element in web.config file under system.web tag

<trust legacyCasModel="true"/>

reference link

http://blogs.rev-net.com/ddewinter/2010/03/02/tip-20-opting-out-of-security-changes-in-net-4-in-asp-net-and-custom-appdomains/

0

精彩评论

暂无评论...
验证码 换一张
取 消