hangfire-autofac

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

ⅰ亾dé卋堺 提交于 2019-12-24 03:30:47
问题 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: _bankClient.FetchAndEnsureTransactionsAsync and _bankClient.RefreshItemAsync . This is causing the application to freeze (the client, browser, stops while the server is still running). I suppose is some weird deadlock , but nothing I've tried seems to make it work! Would someone know how to solve this

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

雨燕双飞 提交于 2019-12-24 03:30:03
问题 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: _bankClient.FetchAndEnsureTransactionsAsync and _bankClient.RefreshItemAsync . This is causing the application to freeze (the client, browser, stops while the server is still running). I suppose is some weird deadlock , but nothing I've tried seems to make it work! Would someone know how to solve this

Resolving Hangfire dependencies/HttpContext in .NET Core Startup

允我心安 提交于 2019-12-10 12:45:54
问题 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(IAppBuilder app) { app.UseHangfireServer(); //app.UseHangfireDashboard(); //RecurringJob.AddOrUpdate(() => DailyJob(), Cron.Daily); } public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddOptions(); services.Configure<AppSettings>(Configuration); services.AddSingleton