Hangfire.AspNet
0.3.0
Prefix Reserved
dotnet add package Hangfire.AspNet --version 0.3.0
NuGet\Install-Package Hangfire.AspNet -Version 0.3.0
<PackageReference Include="Hangfire.AspNet" Version="0.3.0" />
paket add Hangfire.AspNet --version 0.3.0
#r "nuget: Hangfire.AspNet, 0.3.0"
// Install Hangfire.AspNet as a Cake Addin #addin nuget:?package=Hangfire.AspNet&version=0.3.0 // Install Hangfire.AspNet as a Cake Tool #tool nuget:?package=Hangfire.AspNet&version=0.3.0
Hangfire.AspNet
This package provides recommended way to install Hangfire to ASP.NET applications hosted in IIS with later transition to always-running mode in mind. It contains classes and methods that use IRegisteredObject
and IProcessHostPreloadClient
interfaces to plug in to the IIS and ASP.NET application lifecycle more tightly than regular OWIN methods available in the Hangfire.Core
package.
The package also includes a Powershell script to enable Always Running mode for your application that is based on Service Autostart Providers.
The package aims to replace the documentation article Making ASP.NET application always running.
Installation
This project is available as a NuGet Package:
Install-Package Hangfire.AspNet
Usage
The package simplifies Hangfire configuration when an application has multiple startup paths, e.g. when using the autostart providers feature to make a web application always running as described here.
We define a configuration method, and point Hangfire.AspNet to it from each startup point. Hangfire.AspNet will ensure it is called only once, so we have Hangfire initialized if any startup point is triggered.
public class Startup
{
public static IEnumerable<IDisposable> GetHangfireConfiguration()
{
// Calling configuration as a first step
GlobalConfiguration.Configuration
.SetDataCompatibilityLevel(CompatibilityLevel.Version_180)
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseSqlServerStorage("connection_string");
// And then creating background job servers, either one or multiple
yield return new BackgroundJobServer();
}
public void Configuration(IAppBuilder app)
{
// Initializing from a regular web application startup, including
// the developer workflow.
app.UseHangfireAspNet(GetHangfireConfiguration);
app.UseHangfireDashboard();
}
}
public class ApplicationPreload : IProcessHostPreloadClient
{
public void Preload(string[] parameters)
{
// Pointing the same configuration from the Startup class,
// and Hangfire.AspNet will ensure that it is called only
// once.
// This method will be triggered by autostart providers
// feature as described in the article referenced above.
HangfireAspNet.Use(Startup.GetHangfireConfiguration);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5
- Hangfire.Core (>= 1.6.0)
- Microsoft.Owin (>= 3.0.1)
- Microsoft.Owin.Host.SystemWeb (>= 3.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Hangfire.AspNet:
Package | Downloads |
---|---|
UmbracoHangfire
Hangfire scheduled tasks for Umbraco 8 |
|
Allen.Storage.Bootstrapper
Using Hangfire to Implement a Seamless Storage Plan. Separating specific storage infrastructures through abstract interfaces and using unified interfaces to implement different storage infrastructures(sftp,ftps,ftp,smb). |
|
PrecisionScheduler
Replacement for the out-of-the-box scheduler included with Sitecore. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Hangfire.AspNet:
Repository | Stars |
---|---|
fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat
可能是全网最完整的 C# 版微信 SDK,封装全部已知的微信 OpenAPI,包含微信公众平台(订阅号+服务号+小程序+小游戏+小商店+视频号)、微信开放平台、微信商户平台(微信支付+微企付)、企业微信、微信广告平台、微信智能对话开放平台等模块,可跨平台。持续随官方更新,欢迎 Star/Fork/PR。QQ 交流群 875580418【满】、930461548【满】、611974621。
|
https://github.com/HangfireIO/Hangfire.AspNet/releases
0.3.0
• Project – Full source link support with embedded symbols and repository-based sources.
• Project – Enable static analysis via the Microsoft.CodeAnalysis.NetAnalyzers package.
• Project – Sign NuGet package and .NET assemblies with a code signing certificate.
• Project – Require signature validation when restoring NuGet packages.
• Project – Use deterministic and locked package restore for projects.
• Project – Add more metadata for assemblies and NuGet package.
0.2.0
• Added – `AuthorizationFilter` and `ClaimsAuthorizationFilter` classes.
0.1.0 – Initial Release