“System.Data.Entity.Internal.AppConfig"的类型初始值设定项引发异常。

  <connectionStrings>
    <add name="ConnectionStringName"
        providerName="System.Data.SqlClient" connectionString="Data Source=.;Initial Catalog=DataBaseName;Integrated Security=True;Pooling=False" />
  </connectionStrings>

必须写在

  <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=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </configSections>

之后 。


posted @ 2012-08-10 10:51  Devil_Zhang  阅读(11365)  评论(2编辑  收藏