I'm posting this and answering it, because this left me stumped for a very long time. I have the following line in my web.config
:
<aspNetCore processPath="dotnet" arguments=".\XXX.Server.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
So apparently, this should be logging to logs\stdout
, but when I look, there's nothing there. I went on a wild goose chase, searching the whole disk for anything named 'log' (that returned too much) or 'stdout' (that returned nothing), and still couldn't figure it out.
You have literally declared that logs will go to four potential destinations: App Insights, the console, the debug output, and the event viewer.
IIS log files are stored by default in the %SystemDrive%\inetpub\logs\LogFiles folder of your IIS server. The folder is configured in the Directory property on the Logging page for either the server or an individual site.
Though there is some detailed info in Event Viewer for some types of events. In IIS6 (and prior), this is located in %SystemRoot%\system32\logfiles , and in IIS7, this is located in %SystemDrive%\inetpub\logs\LogFiles . In both cases, it will be placed in a subfolder called W3SVC{Id} .
\%home%\LogFiles\stdout .
You could probably check the Event Viewer on your machine -> Application to see if there are any errors logged, which could explain why your log files aren't being generated.
However, the most probable reason is that IIS doesn't have a permission to write to that log folder.
You must make sure the log folder exists! IIS won't make it for you. Such a simple solution to this infuriating problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With