I've created some simple ASP.NET Core app based on .Net Framework 4.6.2. It has a public endpoint which receives and returns file. This app should run continuously on a virtual machine and when I'm starting it manually (exe) it works perfectly.
When it's started by Windows Task Scheduler, I'm able to make a call but in response, I'm getting the file with 0 size - that means that something crashed inside.
What can be the difference between starting app manually and by task scheduler (which I think is causing the crash) and how can I check logs or output of app which is started by Task Scheduler?
The problem actually was in the way how the Task Scheduler run the app. If the app is started by Task Scheduler - it's running like a Windows Service, and root directory for it is C:\Windows\System32\Tasks and I was not able to get my static resources.