0

Title pretty much says it all. I have created a simple ASP.NET core 3.1 website which runs a MQTT subscriper. My problem is that after a while I see message in event viewer:

Application 'MACHINE/WEBROOT/APPHOST/MYWEBSITE' has shutdown.

enter image description here

Is there something I should add in the website itself or in IIS to make the website always running?

Kamsiinov
  • 1,315
  • 2
  • 20
  • 50
  • Does the website take too long to start up again once it has shut down? – Andrew Morton Oct 13 '20 at 18:45
  • Oh, and [user nPcomp points out](https://stackoverflow.com/a/42820639/1115360) that "IIS now has `Idle Time-out Action : Suspend` setting." – Andrew Morton Oct 13 '20 at 18:52
  • Try changing your Idle Time-out to a bigger number instead of a smaller number – tgolisch Oct 13 '20 at 23:19
  • website starts quite rapidly. I would not like to suspend the site at all but keep it running always. Time-out is set to 0 since that should make it disabled. – Kamsiinov Oct 14 '20 at 05:38

2 Answers2

1

I found a complete step to step guide how to fix this from: https://www.taithienbo.com/how-to-auto-start-and-keep-an-asp-net-core-web-application-and-keep-it-running-on-iis/

The missing part from my config was to add application initialization to server roles.

Kamsiinov
  • 1,315
  • 2
  • 20
  • 50
0

I had same problem before and solved with set Rapid-Fail protection to false. If you trust to your server performance or increase failure and maximum failures count.