首页 > 移动平台 > 详细

The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.

时间:2014-08-30 19:07:09      阅读:388      评论:0      收藏:0      [点我收藏+]

当使用EF时,配置文件中会多出下面的配置代码:

<configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>

然后在访问EF的时候会报下面的错误:

The type initializer for ‘System.Data.Entity.Internal.AppConfig‘ threw an exception.

当我把上面的代码注释后,就可以正常使用了,具体原因尚不清楚,先记录下来吧,也许会对你有用.


The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.

原文:http://blog.csdn.net/mx5721/article/details/38945995

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!