Hosted Services require keep alive
Services require keep alive
2023-09-11 14:20:28 时间
转自: https://stackoverflow.com/questions/53753802/do-recurring-hosted-services-require-keep-alive
If you run your ASP.NET Core application in IIS (not IIS Express):
- For your hosted service to start automatically, you need to set the Start Mode of the application pool to Always Running. See Rick Strahl for more information.
- For your hosted service to keep running indefinitely, you need to set the Idle Time-out of the application pool to 0.
If you run the application as a Windows Service, none of this is needed.
Also, for forward compatibility, make your hosted service inherit the BackgroundService
class and register it for dependency injection using AddHostedService
.
AFAIK, using the IIS in-process hosting model in .NET Core 2.2 has no effect on this.
相关文章
- Reporting Services 错误案例一则
- 用 iOS-System-Services 框架获取iOS设备所用的设备信息
- AngularJS学习---REST和自定义服务(REST and Custom Services) ngResource step 11
- [Angular Directive] Combine HostBinding with Services in Angular 2 Directives
- [AngularJS] Services, Factories, and Providers -- Service vs Factory
- [AngularJS] transform in $http services
- [AWS Design Cost-Optimized Architectures] 4.2 Identify cost-effective compute and database services
- [Spring Java] identify transactional business services boundaries
- 如何启用 SAP Business Technology Platform 上的 Mobile Services
- 使用SQL Server Analysis Services数据挖掘的关联规则实现商品推荐功能(八)
- 使用SQL Server Analysis Services数据挖掘的关联规则实现商品推荐功能(七)
- Discovering services for peripheral while delegate is either nil or does not implement(ios蓝牙)
- Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-6.7.1-b
- Amazon Web Services(AWS)简介