Azure Sql throw SqlException when working with hangfire

Tags: #<Tag:0x00007fb505548d70> #<Tag:0x00007fb505548ca8>

I follow this tutorial to make the background job

It’s work perfectly in local…
But when I deploy to azure web service

  1. it will occur -> SqlException: Invalid object name ‘HangFire.Hash’.
    So I decide to put Integrated Security=SSPI; in ConnectionString of azure sql then
  2. it occur -> Windows logins are not supported in this version of SQL Server instead.

How do i make it to work in azure sql?

1 Like

Hi did you ever resolve this? I’ve git the same issue:

System.Data.SqlClient.SqlException (0x80131904): Invalid object name ‘HangFire.AggregatedCounter’.

Unfortunately, it’s long time ago that I cannot even clearly remember if i can solve it. But I think it is because AggregatedCounter database is not in your database. Maybe you can run migrations or do something to force your hangfire to add that table