Hangfire changes its connectionstring after the IIS pool recycles

I have an ASP.NET application that uses SQLServer as the hangfire storage.

I initialize the GlobalConfiguraiton in the Application_Start. In my web.config file I have multiple connection strings. Hangfire has its own connectionstring because it uses a dedicated database.

It works fine but in production, sometimes hangfire ignores the supplied connection string and takes the default connection string. This is the one named “ConnectionString” in web.config.

This happens sometimes when the IIS pool is recycled.

I’m 100% sure that the only point that initizalizes hangfire is in the Application_Start.

Any clue of what might be the issue?

I found the bug in my end. This bug report is wrong.