方法一
//ASP.NET MVC1 -> MVC3 string path = HttpContext.Current.Server.MapPath("~/App_Data/somedata.xml"); //ASP.NET MVC4 string path = HttpContext.Server.MapPath("~/App_Data/somedata.xml");
方法二
HostingEnvironment.MapPath(@"~/App_Data/PriceModels.xml");
方法三
path = AppDomain.CurrentDomain.BaseDirectory + ("\\App_Data");