[Archived] Code for hosting and starting up an ASP.NET Core application. Project moved to https://github.com/aspnet/Extensions and https://github.com/aspnet/AspNetCore
Apache License 2.0
552
stars
312
forks
source link
IHostedService won't start automatically on IIS even if preload enabled #1557
I deployed it on a Windows Server 2012 R2 running IIS 8.5.
The IIS is configured with :
.Net Core 2.1 Runtime installed
.Net Core 2.1 Runtime & Hosting Bundle installed
Pool : Start Mode = AlwaysRunning
Site : Preload Enabled = true
When I restart the server or if I do a iisreset, then the application won't start automatically.
The only way to start it is to call one of its controller at least one time. Then the IHostedService will start and work normally.
This behavior seems to be the Start Mode = OnDemand.
Did I miss something in the website configuration?
Hi,
I'm working on a .Net Core Web Api that uses a IHostedService. But I struggle on making it start automatically after a windows reboot.
I implemented the IHostedService as explained here : https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-2.1
When debugging then everything works fine.
I deployed it on a Windows Server 2012 R2 running IIS 8.5.
The IIS is configured with :
When I restart the server or if I do a
iisreset
, then the application won't start automatically. The only way to start it is to call one of its controller at least one time. Then the IHostedService will start and work normally.This behavior seems to be the Start Mode = OnDemand.
Did I miss something in the website configuration?
Thanks