Hangfire jobs get stuck in Queues and never get processed when deployed in Local IIS

5.6k Views Asked by At

I am having a weird issue here.

I have a simple MVC5 application + Hangfire 1.2.0.

When I was running the app with IIS Express, the queued jobs successfully get processed after queued.

But when I switch to Local IIS the queued jobs never get processed (executed) and stay stuck in the queue. It looks like background server is not firing the job at all.

I am using Windows 7 and IIS 7.5.

Am I missing an important configuration?

2

There are 2 best solutions below

0
On BEST ANSWER

Found an answer...I posted to the same topic I created in Hangfire forum:

http://discuss.hangfire.io/t/hangfire-does-not-process-jobs-when-deployed-in-iis-7-5/386/2

Basically the problem was that I had an <identity impersonation="true" ... /> entry and removing it solved the problem...

0
On

I ran into this issue after deploying against a SQL Server instance with permissions locked down. Granting the following to the database user the web application was connecting with addressed the issue:

  • SELECT, INSERT, UPDATE, DELETE on the Hangfire schema in the application database.
  • EXECUTE on sp_getapplock and sp_releaseapplock in the master database.