wwwroot以外的Elmah logPath [英] Elmah logPath outside wwwroot

查看:90
本文介绍了wwwroot以外的Elmah logPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试部署我们的项目,但无法获得Elmah在wwwroot之外创建xml日志的信息.它当前正在登录到inetpub {site} \ wwwroot \ App_Data,因为这是唯一可行的路径.我们希望它记录到我们的inetpub {site} \ logs文件夹中.有什么想法让它起作用吗?我们已经尝试过.. \和../文件夹的路径,但是它们似乎没有用.

We're trying to deploy our project but we can't get elmah to create the xml logs outsite the wwwroot. It's currently logging to inetpub{site}\wwwroot\App_Data because that's the only path that seemed to work. We would like to have it logging to our inetpub{site}\logs folder. Any ideas on getting this to work? We've already tried ..\ and ../ paths to the folder but they didn't seem to work.

推荐答案

有什么想法可以使它正常工作吗?

Any ideas on getting this to work?

您可以提供日志文件的绝对路径,但应确保配置为在IIS下运行Web应用程序的帐户对此文件夹具有写权限,以便它可以在其中创建和修改文件.

You could provide an absolute path to the log file but you should make sure that the account that is configured to run your web application under IIS has write permissions to this folder so that it can create and modify files inside.

这篇关于wwwroot以外的Elmah logPath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆