【发布时间】:2015-09-26 09:11:10
【问题描述】:
不知道为什么我会收到此错误。这是一个练习代码,所以我学习了实体框架代码第一方法。
我在 web.config 中有以下内容
<add name="CompanyDBContext"
connectionString="server=.; database=CompanyDB;integrated security=true;"
providerName="System.Data.SqlClient"/>
<connectionStrings>
和下面的类
public class CompanyDBContext: DbContext
{
public DbSet<Department> Departments { get; set; }
public DbSet<Employee> Employees { get; set; }
}
错误是:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
提前致谢!
【问题讨论】:
标签: entity-framework-5 code-first