From 2b975f045338d44c812898a28b27a80b291c30de Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Mon, 5 Dec 2022 22:48:08 -0300 Subject: [PATCH 1/2] Restore _httpContext parameter passed to RequestPhysicalApplicationPath when called from GetPhysicalPath, lost at #709 --- dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index ac8b0af58..d9c67d36d 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -2900,7 +2900,7 @@ public string GetPhysicalPath() { if (HttpContext != null) { - _physicalPath = RequestPhysicalPath(); + _physicalPath = RequestPhysicalPath(_HttpContext); } else { @@ -2948,9 +2948,9 @@ public static bool IsHttpContext } #endif } - private static string RequestPhysicalPath() + private static string RequestPhysicalPath(HttpContext httpContext=null) { - string phPath = HttpHelper.RequestPhysicalApplicationPath(); + string phPath = HttpHelper.RequestPhysicalApplicationPath(httpContext); string dirSeparator = Path.DirectorySeparatorChar.ToString(); if (!phPath.EndsWith(dirSeparator)) return $"{phPath}{dirSeparator}"; From 377f9a85b27eda4ae1fd6504aabcf99bdd67474b Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Tue, 6 Dec 2022 09:36:13 -0300 Subject: [PATCH 2/2] Pass HttpContext property instead of _HttpContext field. --- dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index d9c67d36d..522cbb643 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -2900,7 +2900,7 @@ public string GetPhysicalPath() { if (HttpContext != null) { - _physicalPath = RequestPhysicalPath(_HttpContext); + _physicalPath = RequestPhysicalPath(HttpContext); } else {