摘要: 碰到一个不在UI层操作文件的情况,比如BLL层(业务逻辑层),DAL层(数据操作层),这时是没有HttpContext对象的,最终找到一个解决方法:AppDomain.CurrentDomain.BaseDirectory,刚好得到网站的根目录。想要更详细的在下面:原文:http://blog.csdn.net/boyle0630/archive/2008/03/21/2202333.aspx1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName 获取模块的完整路径。2. System.Environment. 阅读全文
posted @ 2010-10-08 17:07 $walker 阅读(710) 评论(0) 推荐(0)