最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net web api2 - .NET hangfire services - Application not getting started - Stack Overflow

programmeradmin7浏览0评论

I am new to .NET webservices.

I am trying to implement Hangfire service in the following way

In startup.cs

Add the below snippets in ConfigureServices() method

services.AddHangfire(config =>
                config.UseSqlServerStorage("<my database connection string>")
                .SetDataCompatibilityLevel(CompatibilityLevel.Version_180)
                        .UseColouredConsoleLogProvider()
                        .UseSimpleAssemblyNameTypeSerializer()
                        .UseRecommendedSerializerSettings()
                );
services.AddHangfireServer();

And in configure() method I added below

app.UseHangfireDashboard();
RecurringJob.AddOrUpdate<FileUploadService>("fileuploadservice", service => service.CheckAndUploadFiles(), Cron.Minutely);

I tried to deploy the code in IIS and after I select "Browse", the following error is displayed

Note: If I revert back, it works fine.

Please help me get the resolution

发布评论

评论列表(0)

  1. 暂无评论