string str = System.Environment.CurrentDirectory;
//result: X:/xxx/xxx (.exe文件所在的目录)
asp.net 获取当前项目路径
原文:http://www.cnblogs.com/mvv118/p/4103810.html