8

An existing setup where .net core (2.2) apis are hosted under IIS 7.5 ran smooth and nice so far.

Suddenly I experienced that the logs hold the message Application is shutting down... without any indicators of errors or other reasons. I started recognizing this when there suddenly were a lot more log files generated than before.

I a not sure but that could have started when I moved from .NET Core 2.1 to 2.2.

Does anyone know if this is a feature or a bug, harmfull or intended?

monty
  • 5,629
  • 11
  • 44
  • 74
  • Check IIS application pool recycle events/shutdown events, and then compare the timestamps with the ones you get in ASP.NET Core logs. – Lex Li Mar 06 '19 at 17:25
  • I have the same issue. Have you found any solution to that? – Anup Jul 02 '19 at 08:50
  • unfortunatly not yet. I assume this could be somehow related to "the new" in process hosting but haven't been able to dig into it deep enough – monty Jul 02 '19 at 09:16

2 Answers2

1

I was getting exactly the same message on my development environment. Even dotnet run wouldn't work. Editing the ~/Properties/launchSettings.json file and selecting a higher port fixed it. (I switched from port 1306 to port 30931).
I still haven't been able to figure out what is suddenly blocking port 1306.

Mike Olund
  • 331
  • 4
  • 6
1

I had the same issue building a .Net Core 3.1 Worker Service. The issue for me was that my Execute method wasn't actually using the await operator.

I fixed the issue by changing a line of logging to this:

 await Task.Run(() => _logger.LogInformation("Starting Service"));
todji
  • 81
  • 3