我将 .NET Framework 版本为 3.5 的解决方案转换为 .NET Framework4.0 的时候(直接从项目属性里面改的)生成成功的 但是在运行的时候出现读取数据库连接字符串出错 数据操作为 Linq 实现下面为错误信息Server Error in '/' Application.
--------------------------------------------------------------------------------------------------------------
Attempt by security transparent method 'WireUnion.Entity.Tables.ArticleContext..ctor()' to access security critical method 'WireUnion.Common.BaseConfig.get_ConnectionString()' failed.Assembly 'WireUnion.Entity, Version=1.0.0.17024, Culture=neutral, PublicKeyToken=null' is ed with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
有人能点醒下吗?
--------------------------------------------------------------------------------------------------------------
Attempt by security transparent method 'WireUnion.Entity.Tables.ArticleContext..ctor()' to access security critical method 'WireUnion.Common.BaseConfig.get_ConnectionString()' failed.Assembly 'WireUnion.Entity, Version=1.0.0.17024, Culture=neutral, PublicKeyToken=null' is ed with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
有人能点醒下吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货