APearTree
APearTree

Reputation: 81

.NET Core iHostedService shutting down IIS

I am running a .NET Core web application on IIS which runs a web request every few minutes, this is working absolutely fine, the app checks the DB and if the time has already elapsed it does the web request running my task.

The issue I am having is that after some time, the app simply stops and I get a message on the event log with "application "Bla Bla Bla" has shutdown.

I've changed my application pool on IIS settings so it keeps itself alive, "StartMode: AlwaysRunning", "Idle time-out(minutes): 0" and "idle time-out action: Suspend".

Still, it seems to shut down every now and again.

What am I doing wrong?

enter image description here

Upvotes: 2

Views: 2332

Answers (1)

CagriK
CagriK

Reputation: 141

May be Visit IHostedService Stop without any reason

Also,

IIS is not a proper way to release scheduler tasks. I advise you that you can use Windows Service.

Click here for further information.

Upvotes: 2

Related Questions