「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
Webサイトの様々なパスを取得する方法。
Server組み込みオブジェクトからHttpServerUtility?インスタンスを取得。
string path = Server.MapPath("./");
HttpContext?.Current.ServerプロパティからHttpServerUtility?インスタンスを取得。
string path = HttpContext.Current.Server.MapPath("./");
https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.applicationpath.aspx
https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.currentexecutionfilepath.aspx
https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.filepath.aspx
https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.path.aspx
https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.physicalapplicationpath.aspx
https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.physicalpath.aspx