「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。 目次 †概要 †Webサイトの様々なパスを取得する方法。 物理ファイル パス †HttpServerUtility?.MapPath? †仮想パスに対応する物理ファイル パス Page内 †Server組み込みオブジェクトからHttpServerUtility?インスタンスを取得。 string path = Server.MapPath("./"); Page外 †HttpContext?.Current.ServerプロパティからHttpServerUtility?インスタンスを取得。 string path = HttpContext.Current.Server.MapPath("./"); HttpRequest? †PhysicalApplicationPath? †https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.physicalapplicationpath.aspx
PhysicalPath? †https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.physicalpath.aspx
仮想パス †HttpRequest? †ApplicationPath? †https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.applicationpath.aspx
CurrentExecutionFilePath? †https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.currentexecutionfilepath.aspx
FilePath? †https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.filepath.aspx
Path †https://msdn.microsoft.com/ja-jp/library/system.web.httprequest.path.aspx
参考 †
アプリケーションの様々なパスを取得する方法 † |