我正在发布并回答它,因为这让我难住了很长时间.我的 web.config 中有以下行:
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=".logsstdout" forwardWindowsAuthToken="false" />很明显,这应该记录到 logsstdout,但是当我查看时,那里什么也没有.我继续疯狂追逐,在整个磁盘中搜索任何名为log"(返回过多)或stdout"(未返回任何内容)的内容,但仍然无法弄清楚.
So apparently, this should be logging to logsstdout, 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 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.
但是,最可能的原因是 IIS 没有写入该日志文件夹的权限.
However, the most probable reason is that IIS doesn't have a permission to write to that log folder.
更多推荐
在 IIS 7.5 上运行 ASP.NET Core 时,日志会去哪里?
发布评论