web程序获取根目录:HttpContext.Current.Server.MapPath
Windows Application和Console获取根目录:System.Environment.CurrentDirectory
Windows Service 获取根目录:System.Threading.Thread.GetDomain().BaseDirectory