[英]Web.config file path declaration
I cant get to write to log files from web.config. 我无法从web.config写入日志文件。 I recently added log4net in to project and it works fine but path declaration is failing.
我最近在项目中添加了log4net,它工作正常,但路径声明失败。 When I give the local path it works fine but when I give the generalized path it fails.
当我给出本地路径时,它工作正常,但是当我给出广义路径时,它失败了。
Local Path:<file value="C://Users//abcd//Source//Repos//project2//sol//sol.logic//sol.logic//Logs//Log4net.txt" />
Generalized Path: "~sol//sol.logic//sol.logic//Logs//Log4net.txt" /> 通用路径:“〜sol // sol.logic // sol.logic // Logs // Log4net.txt” />
Thanks 谢谢
在web.config文件中,也许您可以尝试以下操作:
<appSettings> add key="LOGS" value="~sol\sol.logic\sol.logic\Logs\" /></appSettings>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.