/// <summary> /// 取得网站的根目录的URL /// </summary> /// <returns></returns> private string GetRootURI() { string AppPath = ""; HttpContext HttpCurrent = HttpContext.Current; HttpRequest Req; if (HttpCurrent != null) { Req = HttpCurrent.Request; Req.CheckNotNull("WebFormFunctionHandler.GetRootURI 有误"); AppPath = Req.MapPath("~/"); Debug.Write(AppPath); return(AppPath); } throw new InvalidProgramException("WebFormFunctionHandler.GetRootURI 有误"); }