我正在忙着嘗試將hangfire
添加到我的MVC項目中。我下面的Quick Start GuideHangfire錯誤連接字符串缺少SQL錯誤日誌
我已經加入這個我startup.cs
文件
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
//Hangfire
GlobalConfiguration.Configuration.UseSqlServerStorage("data source=ip;initial catalog=Name;user id=Hangfire;password=Password;");
app.UseHangfireDashboard();
app.UseHangfireServer();
}
然而,當我跑我的項目,我得到以下錯誤:(它突出在我startup.cs類GlobalConfiguration.Configuration.UseSqlServerStorage
線)
Connection string is missing for the SQL error log.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Elmah.ApplicationException: Connection string is missing for the SQL error log.
也許錯誤消息是誤導性的,它只是不是一個有效的連接字符串。連接字符串通常也有一個提供者。只是猜測 –