HangfireIO/Hangfire

Connection string is missing for the SQL error log.

开放

#915 创建于 2017年6月7日

 (1 条评论) (0 个反应) (0 位负责人)C# (1,748 个派生)batch import
a: corehelp wantedt: question

仓库指标

星标
 (10,068 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

I am having an issue with Hangfire:

I am busy trying to add hangfire to my MVC project. I am following the Quick Start Guide

I have added this to my startup.cs file

   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();
    }

However when I run my project I get the following error: (it highlights the GlobalConfiguration.Configuration.UseSqlServerStorage line in my startup.cs class)

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.

I have posted it on SO as well: https://stackoverflow.com/questions/44404484/hangfire-error-connection-string-is-missing-for-the-sql-error-log

贡献者指南