admin管理员组

文章数量:1401634

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

本文标签: aspnet web api2NET hangfire servicesApplication not getting startedStack Overflow