这段代码编译得很好但我的jquery ajax返回
错误:
无法加载资源:服务器响应状态为500(内部服务器错误)
app.js:37 jqXHR = [object Object] textStatus = error errorThrown =内部服务器错误
上下文:
public class IssuesServiceContext : DbContext
{
public IssuesServiceContext() : base("name=IssuesServiceContext")
{
this.Database.Log = s => System.Diagnostics.Debug.WriteLine(s);
}
public DbSet<IssuesModel> IssuesModels { get; set; }
}
web.config
:
<connectionStrings>
<add name="IssuesServiceContext"
connectionString="Data Source=SQLDEV\ESG;Initial Catalog=ABC;User ID=abc;Password=password"
providerName="System.Data.SqlClient"/>
</connectionStrings>
似乎在这一行失败
public IssuesServiceContext() : base("name=IssuesServiceContext")
答案 0 :(得分:0)
我想通了,我也在项目中使用了Oracle。我确实想使用Oracle的实体框架,并决定不这样做。
在Web.config中,我不得不删除此行
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />