Skip to main content
Filter by
Sorted by
Tagged with
0 votes
3 answers
408 views

Hangfire & Autofac.Core.Registration.ComponentNotRegisteredException: The requested service has not been registered

I'm trying to set up Hangfire to execute a method in a service on a recurring basis. However, the AutoFac is complaining that the service is not registered: program.cs var serviceCollection = new ...
Stanley's user avatar
  • 2,734
3 votes
1 answer
2k views

How to run Hangfire as a separate process from the main web application?

I am experiencing a big performance hit with Hangfire running on the same app pool as my web application and our site has become terribly slow with CPU sitting at 96% constantly. I have looked at the ...
Donald N. Mafa's user avatar
2 votes
1 answer
637 views

Hangfire Register IoC Dependency in Scope For Job at Run Time

Issue: most jobs are dependent on configuration dependency. Ideal Solution: (copied here and at end just to save reading if you already know exactly how to do this) I would like to during job Q (...
workabyte's user avatar
  • 3,735
1 vote
1 answer
996 views

How to configure Hangfire with Autofac in a dotnet core console app

I'm trying to port a working Hangfire setup embedded in a Kestrel webserver to a console app. I've modified the web app so it still provides the Hangfire dashboard but doesn't start its own Hangfire ...
Peter Wone's user avatar
  • 18.7k
0 votes
1 answer
515 views

abp.io + hangfire issue A suitable constructor for type XXXX could not be located

I'm just trying to run a background job with ABP.IO project and Hangfire (I have already made it with aspnetboilerplate without any issue) Each time my recurringjob start it throw this error : A ...
seb49's user avatar
  • 107
1 vote
1 answer
940 views

JobActivator in Hangfire doesnt instancelize DataContext for each run of RecurringJob

I am using HangFire and EntityFramework for recurring job public void Start(IContainer container) { GlobalConfiguration.Configuration .UseColouredConsoleLogProvider(LogLevel.Debug) ....
Pribina's user avatar
  • 780
1 vote
2 answers
1k views

How can we let recurring job only trigger on one instance in case of scale out

I use Hangfire to read files from FTP server and I have multiple server instances to read from FTP. I need the recurring job only trigger on one instance to prevent the same job to read from same file....
Mohammed Jarwan's user avatar
2 votes
1 answer
465 views

Autofac RegisterAssemblyTypes from tests

In my Startup class I a have method for RegisterAssemblyTypes through autofac as the following: public class Startup { public void ConfigureContainer(ContainerBuilder builder) { ...
Dr. Strangelove's user avatar
0 votes
1 answer
1k views

Autofac configuration for hangfire

I want to use hangfire in my Asp.Net MVC App and I'm using Autofac as DI. I've installed Hangfire.Autofac nuget I want to add a recurring job like this: UserService.cs public class UserService : ...
mhesabi's user avatar
  • 1,140
1 vote
1 answer
854 views

Hangfire Recurring Job gives ERROR in second execution

I have a recurring job, it works perfectly first time, but after the next execution, it gives ERROR. However, there isn't any exception or error in my GetPendingTrips() method. Can some guide me what ...
awais's user avatar
  • 515
2 votes
1 answer
4k views

Autofac.Core.Registration.ComponentNotRegisteredException, FAILED: An exception occurred during processing of a background job

Exception: The requested service 'Mach.CharterPad.Business.TripManager' has not been registered. To avoid this exception, either register a component to provide the service, check for service ...
awais's user avatar
  • 515
0 votes
0 answers
208 views

Cant use properties of instance while running job on Hangfire

I'm trying to use Hangfire as job scheduler. I created class called Check that has some properties (non-static variables) and Run method. when I trigger the Run method (using Hangfire framework) for ...
Dudu Butbul's user avatar
1 vote
2 answers
385 views

How do I make Hangfire pick jobs queued in the last hour?

My requirement is to process only latest jobs and ignore older jobs. How do I configure that in Hangfire? I have tried IApplyStateFilter for setting ExpirationAttribute public class ...
akhilv's user avatar
  • 69
4 votes
1 answer
4k views

Hangfire is stopping with log caught stopping signal

I have configured Hangfire for my Web API solution. But the Hangfire stops working after sometime logging about stopping signal. However, if API is sit again it loads and works normally. The log ...
akhilv's user avatar
  • 69
0 votes
0 answers
722 views

Autofac Register Concrete Class

I am getting the below error on registering a concrete class using Autofac This is the class [AutomaticRetry(Attempts = 0)] public class NoRetryJob<T> where T : IRecurringJob { private T ...
Harsheet's user avatar
  • 628
6 votes
1 answer
11k views

How to get List of all Hangfire Jobs using JobStorage in C#?

I am using Hangfire BackgroundJob to create a background job in C# using below code. var options = new BackgroundJobServerOptions { ServerName = "Test Server", ...
prog1011's user avatar
  • 3,485
1 vote
0 answers
940 views

Can't Enqueue my Job in hangfire server

I am working on enqueue jobs using hangfire in my application. my enqueue job statement is given below, string jobId = BackgroundJob.Enqueue(() => strategy.get(typeof(_service.Engine....
npatel's user avatar
  • 51
1 vote
2 answers
2k views

Hangfire is running jobs sequentially

I am using HangFire hosted by IIS with an app pool set to "AlwaysRunning". I am using the Autofac extension for DI. Currently, when running background jobs with HangFire they are executing ...
William's user avatar
  • 317
1 vote
2 answers
4k views

Call Hangfire Job (Recurring Job) from external API

I have been using Hang-fire in our project but had a question, Can i call a hangfire Recurring Job from an API? For Example: http://devmyproject.com/projectname/recurring is the url for Hangfire ...
Arjun A's user avatar
  • 141
0 votes
1 answer
1k views

Hangfire Autofac integration is not able to resolve service with registred dependency

I'm using hangfire to lauch background job but I have a problem when I try to use the hangfire autofac integration with generic to resolve automaticly the task service it's not working because it's is ...
jboo's user avatar
  • 374
12 votes
3 answers
7k views

Resolving Hangfire dependencies/HttpContext in .NET Core Startup

I've installed and configured Hangfire in my .NET Core web application's Startup class as follows (with a lot of the non-Hangfire code removed): public class Startup { public void Configuration(...
mellis481's user avatar
  • 4,138
0 votes
0 answers
158 views

Sending recurring mail in background in every ten minutes

I want to send mail to admin in every ten minutes after the application has started. Simple recurring tasks has been running. But when I try to send mail, I get "Autofac.Core.Registration....
user3127109's user avatar
  • 3,753
2 votes
0 answers
1k views

Queuing BankgroundJob with Hangfire within an async action in ASP.NET MVC freeze the application

I have this action on one of my controllers which is called by another method which has been called also by another action. All works fine, unless I try to en-queue with Hangfire some jobs: ...
sabotero's user avatar
  • 4,355
2 votes
1 answer
2k views

HangFire Recurring Jobs Fail on server with Autofac.Core.Registration.ComponentNotRegisteredException or No parameterless exception

I've just started using HangFire. The jobs seem to work fine when I run it locally from IIS Express, but when I run it on my dev server I get errors that no parameterless constructor defined. I was ...
Madhav Shenoy's user avatar
3 votes
1 answer
6k views

Hangfire With Autofac in WebApi

I have following configuration in startup.cs but I am getting error although I have installed Hangifre.Autofac nuget package and configured. No scope with a Tag matching 'AutofacWebRequest' is ...
SOF User's user avatar
  • 7,820