We found a problem, ASP.NET Core application on some servers randomly restarts every day at random times.
- Windows Server 2012 R2 Standard, IIS 8.5.9600.16384
- Hosting bundle Microsoft.NETCore.App 2.1.4, Microsoft.AspNetCore.App 2.1.4
- Out of process hosting model
- Application pool recycling is disabled
In Event Viewer In Application Section
Application 'MACHINE/WEBROOT/APPHOST/APPLICATIONNAME' started process 'xxx' successfully and is listening on port 'xxx'. (Event ID 1001)
Sent shutdown HTTP message to process '6860' and received http status '202'. (Event ID 1006)
App_offline file 'app_offline.htm' was detected (Event ID 1012)
And in System Section at same time
The TCP/IP NetBIOS Helper service entered the running state. (Event ID 7036)
The TCP/IP NetBIOS Helper service entered the stopped state. (Event ID 7036)
The TCP/IP NetBIOS Helper service was successfully sent a stop control. The reason specified was: 0x40030011 [Operating System: Network Connectivity (Planned)] Comment: None (Event ID 7042)
All events happen in 2-3 seconds

Very strange behavior IIS and AspNetCoreModule when our application node have problems with DHCP when lease time has expired and LAN adapter refreshes DHCP leases.
At this point, the aspnet module starts to see the app_offline.htm file (we have no idea why this is happening) and then immediately restarts the application.
And only servers with this problem, DHCP was turned on. We specified a static IP address in the adapter settings to solve this problem.