【发布时间】:2017-02-13 00:36:17
【问题描述】:
<connectionStrings>
<add name="CentralDb" connectionString=
"metadata=.\CentralDb.csdl|.\CentralDb.ssdl|.\CentralDb.msl;
provider=System.Data.SqlClient;
provider connection string=CentralDb"Data Source=U19675709\SQLEXPRESS"Initial Catalog=CentralDb"Integrated Security=True;MultipleActiveResultSets=False""
providerName="System.Data.EntityClient" />
<add name="DefaultConnection" connectionString=
"metadata=.\CentralDb.csdl|.\CentralDb.ssdl|.\CentralDb.msl;
provider=System.Data.SqlClient;
provider connection string=CentralDb"Data Source=U19675709\SQLEXPRESS"Initial Catalog=CentralDb"Integrated Security=True;MultipleActiveResultSets=False""
providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
我正在尝试为使用数据库的 EntityFramework 创建连接字符串。
初始化字符串的格式不符合从索引 227 开始的规范。
...是我在尝试使用上面的 web.config
运行时收到的错误【问题讨论】:
标签: c# sql .net entity-framework connection-string