アプリケーションの起動時に、アプリケーションの物理ルートと相対ルートをメモリに格納しようとしています。Global.Asaxで相対ルートを取得する
私はそうのような物理的なパスでした:
//Get the physical root and store it
Global.ApplicationPhysicalPath = Request.PhysicalApplicationPath;
をしかし、私は、相対パスを取得することはできません。私は作品次のコードを持っているが、それはそれはpage
オブジェクト内に置くことが必要です。
Global.ApplicationRelativePath = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "") + Page.ResolveUrl("~/");
おかげ