Why is the ${basedir} NLog configuration not working?

不羁岁月 提交于 2019-12-01 16:20:32

This issue is related to file permission. Short story: the user that the web application is running as does not have permission to write the log files.

Depending on the version of .NET and the version of IIS, there are a variety of users that it could be.

For IIS 6, I would say that the web application is running as the NETWORK SERVICE account.

Therefore, you will need to grant this user permission to write/modify the logs folder (which I presume is a sub-folder of the web root). If you want the logs folder to be created automatically by NLog, you'll need to grant these permissions to the web root instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!