码迷,mamicode.com
首页 > 移动开发 > 详细

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

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

标签:http   os   使用   io   for   文件   cti   代码   html   

当使用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   os   使用   io   for   文件   cti   代码   html   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!