Azure Sql throw SqlException when working with hangfire

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

Do you have the structure of the tables of hangfire?
I have the same issue:(

It’s been long since I’m working on C#. So I did not have the copy of the schema anymore.
But after quick searching, I found the sql file from the hangfire library. Maybe you can try executing the file below.