From 71494dbd7ed14430361e17532fc13513d92cd7c2 Mon Sep 17 00:00:00 2001 From: claudiamurialdo Date: Mon, 17 Nov 2025 10:00:46 -0300 Subject: [PATCH 1/4] Add null-safe checks in IsCrawlerRequest_impl --- dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index cdc752bc4..edca1853e 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -1299,11 +1299,8 @@ public bool IsForward() public bool isCrawlerRequest_impl() { - if (_HttpContext != null && _HttpContext.Request.QueryString.ToString().Contains("_escaped_fragment_")) - { - return true; - } - return false; + string query = _HttpContext?.Request?.QueryString.ToString(); + return !string.IsNullOrEmpty(query) && query.Contains("_escaped_fragment_"); } public HtmlTextWriter OutputWriter From 7266819116fdd1f7347af219ba31a24f6926f03a Mon Sep 17 00:00:00 2001 From: claudiamurialdo Date: Mon, 17 Nov 2025 12:35:45 -0300 Subject: [PATCH 2/4] Add null-safe checks in IsCrawlerRequest_impl. --- .../src/dotnetframework/GxClasses/Core/GXApplication.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index edca1853e..d1bb6bd41 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -1299,7 +1299,13 @@ public bool IsForward() public bool isCrawlerRequest_impl() { - string query = _HttpContext?.Request?.QueryString.ToString(); + string query; +#if NETCORE + QueryString? queryString = (_HttpContext?.Request?.QueryString); + query = queryString.HasValue ? queryString.Value.ToString() : null; +#else + query = _HttpContext?.Request?.QueryString.ToString(); +#endif return !string.IsNullOrEmpty(query) && query.Contains("_escaped_fragment_"); } From 594c006857f165f3c5d18e27b60642255fa7491f Mon Sep 17 00:00:00 2001 From: claudiamurialdo Date: Mon, 17 Nov 2025 17:46:17 -0300 Subject: [PATCH 3/4] Add null-safe checks in IsForward. --- .../dotnetframework/GxClasses/Core/GXApplication.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index d1bb6bd41..2dee4ed64 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -1288,11 +1288,24 @@ public bool IsForward() { if (_HttpContext != null) { +#if NETCORE + object callMethodObj; + if (_HttpContext.Items.TryGetValue("gx_webcall_method", out callMethodObj)) + { + + string callMethod = callMethodObj as string; + if (!string.IsNullOrEmpty(callMethod) && (string.Compare(callMethod, "forward", true) == 0)) + { + return true; + } + } +#else string callMethod = (string)_HttpContext.Items["gx_webcall_method"]; if ((callMethod != null) && (string.Compare(callMethod, "forward", true) == 0)) { return true; } +#endif } return false; } From c7e2d74f9912ecd678be9d075ec9ba39abd52137 Mon Sep 17 00:00:00 2001 From: claudiamurialdo Date: Tue, 18 Nov 2025 11:34:48 -0300 Subject: [PATCH 4/4] IsSubmited was not copied to UTL contexts. --- dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index 2dee4ed64..6fb65110f 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -1243,6 +1243,7 @@ public IGxContext UtlClone() DataStoreUtil.LoadDataStores(ctx); ctx.SetPhysicalPath(this.GetPhysicalPath()); ctx.SetSession(this.GetSession()); + ctx._isSumbited = this.IsSubmited; if (this.HttpContext != null) { ctx.HttpContext = this.HttpContext;