I’m playing with Hangfire to see if it will work for us.
I would like various services hosted in Console apps, IIS/WCF, Windows Services, Task scheduler hosts, ect to Queue a peice of work (fire and forget) and executed on the hangfire servers?
If the hangfire web servers have the required assemblies in the IOC container is this possible?
I think my assumptions are correct but I can’t get any of the IOC containers to work (I think) because Hangfire has the following errors.
Could not load file or assembly ‘TestPlugin’, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
I have nLog assemblies in the project and I thought I saw the documentation say it will use it without configuration but I dont see any log files (I configured in the nlog.config)
Ideas?
GlobalConfiguration.Configuration.UseSqlServerStorage(“HangFire”);
BackgroundJobClient client = new BackgroundJobClient();
client.Enqueue(t => t.Do());
public class Worker
{
public Worker() { }
public void Do()
{
Task.Delay(5000);
}
}