web程序或者web服务中获取当前目录的方法

web程序或者web服务中获取当前目录的方法:
下的一个xml文件夹中的xml文件方法,
涉及到两点:
1. 获取当前site路径:System.AppDomain.CurrentDomain.BaseDirectory
2. 使用@转义符。用在不太复杂的转义符场合。
最终形式:
string filestring = System.AppDomain.CurrentDomain.BaseDirectory + @"\xml\" + cn +".xml"

原文地址:https://www.cnblogs.com/YEKEYISHUO/p/2970790.html