1.读取配置文件参数
<appSettings>
<add key="Log4net" value="1"/>
</appSettings>
string filePath = System.Configuration.ConfigurationManager.AppSettings["log4netPath"].ToString();
System.IO.FileInfo file = new System.IO.FileInfo(HttpContext.Current.Server.MapPath(filePath));
时间: 2024-11-08 17:53:48