25 questions
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 ...
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 ...
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 (...
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 ...
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 ...
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)
....
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....
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)
{
...
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 : ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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",
...
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....
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 ...
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 ...
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 ...
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(...
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....
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: ...
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 ...
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 ...